I've been searching for days to find a simple method of calculating the X,Y,Z coordinates of a planet that is in orbit at any point in time around another planet/star/sun. All of the related resources I've found are heavily focused on finding values based on observing actual planets in motion and calculating parameters such as eccentricity, etc, but my situation seems slightly different and I don't know exactly how to tackle it. I'm wanting to simulate a random orbit that I create in a software application, not calculate values based on observing a planet in orbit. In my mind, this should be easier to do, but I'm still struggling with the math.
To put it more precisely, here's what I would like to do.
- Create a stationary "sun" at point
- Create multiple "planets" at points where n is the number of the planet from 1 to infinity
- Generate all of the necessary parameters to define each planet's orbit around the sun while only looking to avoid collisions at intersection points (if possible)
- For each computer cycle, calculate the new position of each planet based on their calculated orbits
I'm hoping to avoid using physics altogether (no mass, force, etc needed) as accuracy is not nearly as important as efficiency in terms of CPU cycles of my simulation.
Can anyone lead me in the right direction?