I'm working on the next version of this sim. It's neat and all as it is. But imagine you could have stars that moved... change the colors of objects at will... put thousands of planets on the screen... or test out force laws like r^r.
Now imagine that you could play this new version right now!
This gravity simulation is a sandbox on a grand scale. Put planets, stars, and asteroids in place, give them an initial push, and see where they go. Observe the conic sections that emerge from the simple rules of gravitational attraction.
But gravity has more secrets in mind than even Newton knew. With a single star, the motions are easily predictable, yes. But add another star or planet into the equation, and things become chaotic. Remarkable patterns can appear in a seemingly random way.
Why stop there? Go ahead and simulate what we might observe if gravity deviates from a 1/r^2 law. Change the law just a little, and try to recreate the strange and famous behaviour of Mercury.
Throughout it all, though, there will be beautiful and captivating pictures. So why not make your own wallpaper? Download high-resolution copies of your results, share them with friends, post them on your wall, and enjoy the simple art of the spheres.
Select a star, planet, or asteroid from the bottom menu. Then click and drag your mouse to place it and give it a starting velocity.
Note: for the purposes of this simulation, a 'star' is always stationary. A 'planet' moves and can gravitationally attract other bodies. An 'asteroid' moves, but is too light to pull other objects towards it.
July 2011: Released!
October 2012: Improved it a bunch: calculation speed, accuracy, save-and-load capabilities, and variable masses.
March 2013: Increased the range of exponents allowed. Try a boring old r^-2 force law... or zoom off and try r^-5 or even r^2. I recommend trying r^1. See if you can find anything interesting about it.