I'm a game developer, and I'm working a space game, where I have to simulate a spacecraft's orbit, traveling from the earth to the moon. I would need the apoapsis and periapsis of the orbit. I have the mass, position, and velocity of the objects.

Only problem is, I absolutely don't understand astrophysics, so I couldn't understand the equations I found on the internet. So I would be very grateful, if someone could explain me this.

  • 1
    $\begingroup$ I'm curious to know how a computer programmer is not able to code mathematics? The problems are less related to astrophysics as they are to caculus, and related mathematical fields (non-linear alegrba, etc). One good book I've used is Astronomical Algorithms by Jean Meeus. $\endgroup$ – EastOfJupiter May 5 '16 at 15:35
  • 2
    $\begingroup$ There are already answered questions here on the calculation of orbital elements from position and velocity, and the use of orbital elements. Search for and read those first. $\endgroup$ – Mark Adler May 5 '16 at 15:46
  • 1
    $\begingroup$ Please review this question and see if it addresses your concerns. If not, please edit your post to clarify what you are still struggling with or if you need resource recommendations (like EastOfJupiter's book suggestion). $\endgroup$ – called2voyage May 5 '16 at 15:46
  • $\begingroup$ Many people have been able to get the basic idea how to get rockets into space and get them to orbit other bodies by reading various tutorials and wikis related to the Kerbal Space Program. At first it looks silly (to some) but actually there is a lot to learn if you find the right video and listen carefully. After all Kerbal is aweome! $\endgroup$ – uhoh May 5 '16 at 16:13
  • 2
    $\begingroup$ BTW, three-body problem, with Earth and Moon exerting gravity on the craft simultaneously, will create somewhat challenging computation. You can take KSP's simplification of splitting this into 2-body problems - until you cross Moon's Hill Sphere, your craft is only affected by Earth. Once you cross it, it's only affected by Moon, disregarding Earth. You won't be able to simulate the Lagrangian Points but otherwise the approximation is quite good. $\endgroup$ – SF. May 5 '16 at 17:55

Browse other questions tagged or ask your own question.