determining orbit parameters (eccentricity, length and angle of major axis)

I'm trying to make an orbit simulator, and I want to draw the orbit of a satellite given its position and velocity vectors in a 2-D plane. I found this other question which tells how to calculate eccentricity and semimajor axis, but how do I figure out the orientation of the major axis (if e > 0)?

• At some point you just want to either compute or look-up the closed form solution. See any upper-division or graduate mechanics text. From there it should be pretty clear how to proceed as you can find the angular dependence of the radial velocity and radial distance. – dmckee Sep 22 '13 at 14:50
• I found a couple of pdf files on orbital mechanics, the problem is that when they mention an angle, I'm not sure if it's the same angle as the one I'm talking about. – Jason S Sep 22 '13 at 14:51
• ...and I don't have a textbook. (not taking a class or anything, just fooling around with HTML5 animation and differential equation solving) – Jason S Sep 22 '13 at 14:52
• So is there a conventional term for what I'm looking for? If I knew what it was called, I could look it up. – Jason S Sep 22 '13 at 14:56
• Is it "argument of periapsis"? en.wikipedia.org/wiki/Orbital_parameters – Jason S Sep 22 '13 at 14:59

$$\begin{eqnarray} \vec{h} &=& \vec{r} \times \vec{v} \\ \mu\vec{e} &=& \vec{v} \times \vec{h} - \frac{\mu}{r}\vec{r} \\ \vec{r}_{orbit}(\theta) &=& \frac{|h|^2 \hat{u}(\theta)}{\mu + \mu\vec{e}\cdot\hat{u}(\theta) } \end{eqnarray}$$
where $\vec{h}$ is the angular momentum, $\mu \vec{e}$ is the Laplace vector ($\mu = MG$, and $\vec{e}$ is the eccentricity vector), and $\hat{u}(\theta) = \hat{u}_x \cos \theta + \hat{u}_y \sin \theta$ is the unit vector in the orbital plane, as a function of $\theta$, which represents the angle in polar coordinates used to draw the orbit.