Here's a fun little gravity simulator that I also made in processing. You can make different gravitational bodies and see how they interact. If they get too close they'll combine into a more massive glob. The radii of the bodies increase with the cube root of the mass, as if they were spheres. This one was a little tricky and taught me a lot about how Java does math. Check it out on my github!
CONTROLS: click and drag to create planets. The longer you click, the more massive the planet will be. Hold DOWN while clicking to make a sun. Press shift to clear the trails. Press space to clear the bodies.