I know that it looks like a simple animation, but this project actually uses the real gravitational formula. Object 1 is on the left, and object 2 is on the right. This project runs 10^13 (10,000,000,000,000) times faster than it actually would. Press R to restart. Don't set the masses to anything more than 4000. Example: If you set the mass of one object to 2000 and the other object to 200, it takes about 11 seconds (although in real time, it would take 11*10^13, or 110,000,000,000,000 seconds, which is 3485689.65954 years). The variable for "Gravitational Constant" is 10^9 times greater than it actually is. The variable for "Gravitational Force" is 10^9 times greater than it actually is, not 10^13. The masses of the two objects are not equal, so they are pulled towards each other at different rates. You can set both masses. Don't make the mass too large, or it will glitch. It restarts once the objects touch each other. This is a realistic gravitational simulation. However, because Scratch can't support numbers lower than 10^-5 and because the distance was too great for 10^-5, I had to use 10^2, so the gravitational force is 10^9 (or 1,000,000,000) times greater than it actually is. However, even at this speed, it takes much too long for the project to finish, so both objects move 100 times faster than they really would, making it 10^4 times faster, which when multiplied by 10^9 gives you 10^13 (10,000,000,000,000), so this project is 10^13 times faster than in reality. The gravitational formula is: F=G*m1*m2/r*r (or r squared) F=force G=gravitational constant m1=mass of first object m2=mass of second object r=distance between the objects
Isaac Newton for the formula. :)