Basic Gravity Simulator ############################################ The code is fairly simple and doesn't require too much maths. Still working on getting the scaling right. You might have to run it a couple of times to get any interesting orbitals. The objects are still being run off the screen, so its worth waiting for a while if nothing seems to be happening, as there's a possibility for some objects to return to the screen. Equations: F=GMm/r^2 F=ma :. a=GM/r^2 Sprite 1 contains the original attempt, where I used the dot-product rule to find the angles between column vectors where vector A=(0,1) (ie. North). Realised I didn't need to find the angles and can just use the ratio between the resolved X&Y distances and the resultant distance with the resultant Force/Acceleration to find the resolved X&Y Force/Accleration. I started in 2D, and just added the 3rd Dimension as Z, where it affects the size of the object. I added the pen block just so you can visualise the orbital pathways. Makes for some cool mathsy art. The colours represent the mass of the object. Thought it was too simple, so added parallax angles as well. Calculations as follows: tan(theta) = x/(z+v) deltax=vtan(theta) simplified: deltax=vx/(z+v) v = viewing distance (ie, distance of camera from "screen") Same done for y shift I've placed a large mass in the centre just to make it a little more interesting. Feel free to take out that part in the main setup.