my goal is to make a simulation of the solarsystem in which i can fly around with a spaceship. the first problem is that the distances between object and the relation to their sizes are far too big for "usual" float calculations. to make the furthest body (lets say neptune) visible in my view frustum (zfar ~= 1000.0f), i'll draw much smaller spheres much closer to me (the scene's "camera").

the problem is the mathematical equation to calculate a planets position for each time, like:

vec3 position = s(t);

a simlpe circle is the easiest thing, there wouldnt be changes in velocity over time, but an elliptic orbit is much more difficult. i've seached a few hours, could find anything useful (any formular like s(t), i found only r(phi) and v(phi)). can anyone give me a hint ?

the problem is that the velocity (and thus the angular velocity) isnt const, it varies depending on the distance to the center / sun. i've heared some time ago that just going with the force, calculating acceleration, and moving the object:

Code :

velocity += (Force / Mass) * frametime
position += velocity * frametime

any suggestions ? ]]>