Physics is hard
I hoped just by sticking in gravity, planets would orbit a sun. Apparently I stand corrected.
I may have to cheat a bit…
Comments
21. Apr 2012 路 03:16 UTC
sine ftw 馃槈
Shiera
21. Apr 2012 路 03:40 UTC
Hello
zzorn
21. Apr 2012 路 03:57 UTC
So a sideways speed of sqrt(G*M/r), where G is the gravitational constant 6.67*10^-11, M is the mass of the planet, and r is the distance from the planet center. This assumes that the gravitational force is calculated using the first formula in the previous post. Remember to also keep the values in float or double variables.
Lawrence Esswood
21. Apr 2012 路 14:39 UTC
XD. Physics wasnt the solution, it was the problem. The perfect model only rarely put planets in orbit, they would spiral in our out. I simply cheated a bit for things I really WANTED to orbit each other.