Inspiration

We wanted to make a 3-D model of an astronomical phenomenon. As beginner programmers, this was something that seemed approachable, challenging and interesting.

What it does

It randomizes the positions of N particles in cloud formation, and gives them an initial angular velocity about an axis passing through the center of mass of the cloud. Gravity is applied on these particles, causing them to collapse in on each other. Some particles get ejected into space, as in a regular system.

In the second part of the project, the particles do not have an initial angular velocity but they collide partially inelastically and form a star too.

How we built it

We learned vPython using web tutorials, and determined the equations necessary using our knowledge of classical mechanics and linear algebra. A lack of sleep and sugar was also instrumental.

Challenges we ran into

vPython does not work on JupyterLab, so we were unable to get high numbers of gas particles. We also did not manage to induce rotations in a visible way when one particle collides at an angle with another.

Accomplishments that we're proud of

Fixing the center of mass axis and making an algorithm to define collisions was difficult, and we are proud of our results.

What we learned

The little things take the longest time to figure out - when coding a simulation, anything that can go wrong will go wrong, and we need to take into account every special case.

What's next for Stellar Formation

We would like to be able to induce rotations in a visible way, and we would also like to include relativistic effects in a later version of this code.

(Here are both the videos in a playlist. The site would not let us put both on our page) https://youtube.com/playlist?list=PLlBpdTRfPnpAOCSD_RNlgYMP5IrIX9Q-t

Built With

Share this project:

Updates