Errm, where do I start in building a Virtual Solar System?
How about the orbits of the planets? At the start of the 17th Century, Kepler coined his laws of planetary motion. His first law defined the orbit of a planet as an ellipse with the sun at a focus, and the position on an ellipse can be defined by six unique pieces of data:
- Semi-Major Axis (a)
- Eccentricity (e)
- Inclination (i)
- Argument of Perifocus (ω)
- Longitude of Ascending Node (Ω)
- True Anomaly (θ)
These "Orbital Elements" for each body are available on the NASA JPL Horizons system.
The XNA Creators Club is a fantastic resource, with heaps of examples to get me started on a simple app to render orbital positions. Plugging in the data gave me the following results:
Once I had this basic framework for rendering orbits and positions I could add additional bodies, such as comets and moons as shown below