Very basic gravity simulator. You can drag the objects around, and clicking on an empty space will pull P1 towards your mouse. (if you aren't sure which one is P1, pressing S will bring up advanced details) Space to pause and unpause the project. G = Gravitational constant. 1 is normal gravity. m1 = Mass of P1 m2 = Mass of P2 Force = How much force is being exerted on both individual objects. Distance = How far apart the two objects are. Speed = How far each object is moving per physics iteration.
Thanks to Google for telling me the equation for gravity because I would screw everything up if I had to do it off the top of my head because I don't remember anything from school. The equation to figure out how much force should be exerted on each object is f=G(m1*m2)/d² The equation to figure out the speed of each object is s=f/m*5 f = force g = gravitational constant m1 = mass of object 1 m2 = mass of object 2 d = distance s = speed m = mass