Log In  


Cart #wihifuzuju-0 | 2025-04-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1


Made this simple gravity simulator. It starts with the same 3 bodies each time with arbitrary masses, positions, and velocities. Should be simple to change those in code and the format for each planet will be down below. Also if you uncomment some of the code in the populate function it will populate randomly. I might update this someday, I might not, in any case it was a fun project.

Planet format is {x, y, x velocity, y velocity, id, mass}
the id is just the position in the array.

1


Very cool! I made one yesterday too.


[watches as bodies gradually launch each other into hyperspace]

Hey, hey! In this forum we obey the laws of thermodynamics! 😂



[Please log in to post a comment]