# How do I find equations for the distance of the planets relative to one another?

I know I should be able to piece together some basic Newtonian equations for this, but I'm not sure where to start. I want to be able to choose one planet as the center and calculate its distance from another planet over time as they both rotate the sun.

First I need to even find equations for the motion of the planets, then... magic?

Thanks for any guidance!

-
You can't easily for the time parametrization, you need the area of an ellipse in an angular wedge through the focus, and this is a special function. The planetary motion is only expressible as a function of time in elementary functions when you have circular orbits, or when you use a nonuniform parametrization of time which is the area swept out by the planet. If you are ok with a circular orbit approximation, then it is easy, but imprecise, and the leading error is that the circular velocity is nonuniform, and uniform around an "equant" center, like Ptolmey's model. How accurate do you want? – Ron Maimon Nov 12 '11 at 22:48
It would be nice if it were ellipses, but I wouldn't need any correction for gravitational or mass interactions between the planets. I do want to capture the change in speed as the planet sweeps around the perihelion, this is a pretty important characteristic. I checked out the equations for Kepler's laws of motion and he solves for (r,theta) as a function of time since perihelion: en.wikipedia.org/wiki/Kepler's_laws_of_planetary_motion – youdonotexist Nov 12 '11 at 23:01
Just not sure how to turn these equations into relative distances. – youdonotexist Nov 12 '11 at 23:01
To find the relative position, you just subtract the two position vectors, given by $(r\cos(\theta),r\sin(\theta))$ for the two planets, and find the length of the vector. The central problem is finding $r$ and $\theta$ as a function of time, these are not given by Kepler. Kepler gives $r$ as a function of $\theta$ and $\theta$ implicitly as a function of time by the condition that equal areas are swept in equal times. – Ron Maimon Nov 12 '11 at 23:05
It maybe would be more practical to download some planetarium software, where there will be iterative numerical solutions of the equations. freeware.intrastar.net/planetarium.htm . For example,in the link ther is a program described: realtech-vr.com/skyorb which allows any position in the solar system . – anna v Nov 13 '11 at 17:49