I'm trying to make a basic model of the solar system in Direct X. I want to have the planets orbit the sun and the moon orbit the planets. So I have the planet/star/moon which takes a pointer to it's parent position vector. From that, how would I be able to make the object orbit at a set speed?
So for example the moon would have a pointer to the earth's position vector and a distance to stay from the earth. I'd need the moon to orbit the earth over 24 hours (or any time frame, I'm sure I would be able to adjust that myself). Similarly the earth would have a pointer to the sun's position and would rotate around that over 365 days.
I just don't know how to work out how to work out the orbital position.