physics,angle,orbit,orbital-mechanics

There is not a simple formula as such but there is an algorithm you could program to determine the results. Pentadecagon is also correct in that you need to take into account n*360. You are also right in that you stop one of the planets and work on the difference...

c++,math,physics,game-physics,orbital-mechanics

You're probably looking for Newton's Law of Universal Gravitation. Gm1m2 / r2 = F Once you find F you can just use it in a standard equation of motion: Fyt2 / 2 + vyt + y0 = y Fxt2 / 2 + vxt + x0 = x ...

ios,swift,scenekit,orbital-mechanics

You're looking for a parameterization of the surface of the sphere. You can find this online (but it can be tricky if you don't know the magic words to enter for your searches). Check out the entry on MathWorld. The surface of the sphere is parameterized by two angle variables,...

java,2d,game-physics,gravity,orbital-mechanics

The following code fixed my issue. I was overcomplicating my math equations as I usually do. Took me three weeks of Googling, asking people with degrees in physics and mathematics, and reading Javadocs before I figured that one out. Turns out how atan2 works is simply different from how I...