Equation / formula to determine an objects position on an ellipitcal path

Posted by David Murphy on Game Development See other posts from Game Development or by David Murphy
Published on 2014-06-10T01:36:22Z Indexed on 2014/06/10 3:45 UTC
Read the original article Hit count: 253

Filed under:
|

I'm making a space game, as such I need objects to follow an elliptical path (orbit).

I've worked out how to calculate all the important aspects of my orbits, the only remaining thing is how to have an object follow it.

My Orbit class contains the major, minor (and by extension semi-major,semi-minor) lengths. The focii radius, area and circumference even.

What is the equation to determine an objects x/y position (only need 2D) on an ellipse with a certain speed after a period of time. Basically, every frame I want to update the position based on the amount of elapsed time.

I would like to have the speed along the path speed up and slow down according to the distance from the object it's orbiting, but not sure how to factor this in to the above given that at any point in time the speed has changed from it's previous speed.

EDIT I can't answer my own question. But I found the question and answer is already on stackexchange: Kepler orbit : get position on the orbit over time

© Game Development or respective owner

Related posts about mathematics

Related posts about geometry