Texas2011 said:
If I wanted to plot the distance as a function of time with t=0 being the closest the object would get, how would I do it?
If you have access to a spreadsheet or similar you can fairly easy make such a plot based on an approximation of the radius.
First you have mean anomaly
M = \frac{2 \pi T}{P}
where T is the time since last periapsis passage and P is period, both values expressed in same time unit. From M you now have to solve Keplers equation to get eccentric anomaly E which relates to mean anomaly M as
M = E -e\sin E
In a program you would normally solve this equation numerically by iteration until a desired accuracy is obtained. In a spreadsheet you can instead use a fixed approximation like (taken from [1])
E \approx M+\left(e-\frac{e^3}{8}\right)\sin M + \frac{1}{2}e^2 \sin 2M + \frac{3}{8}e^3 \sin 3M
if eccentricity is not too large, or you can set up a fixed number of fast converging iterations, like using Newton's method (see for instance [2]) to get
E_{i+1} = E_i + \frac{M+e\sin E_i - E_i}{1-e\cos E_i}
with all angles in radians and E_0 = M for e < 0.8 and E_0 = \pi otherwise. In a spreadsheet you can set up a fixed number of successive columns to calculate E_i and then use the last approximation as E.
From eccentric anomaly E you can calculate the normalized radius as
\rho = \frac{r}{a} = 1 - e \cos E
where a is the semi-major axis. In a spreadsheet you can now plot \rho as a function of time or mean anomaly. Notice that I skipped calculating the so-called true anomaly and went straight to radius. The true anomaly would for instance be needed in addition to the radius if you wanted to plot the 2D position instead of only the radius.
As you can see, apart from finding a good approximation for E, the rest is rather simple. Feel free to ask if some of the above is too hazy for you.
[1] Orbital Motion, A.E. Roy, Adam Hilger, 1988.
[2] Weisstein, Eric W. "Kepler's Equation." From MathWorld --
http://mathworld.wolfram.com/KeplersEquation.html