- #1

kiloNewton

- 5

- 1

- Homework Statement
- Plot the trajectory of the Moon around the Earth.

- Relevant Equations
- <x',y'> = R <x,y>

I'm tasked with drawing the trajectory of the Moon around the Earth (in 2D), taking into account the fact that the trajectory also undergoes precession, so the elliptical orbit rotates about it's center (I think it should rotate around the Earth-Moon barycenter, but for the first step I neglected this).

So I approached this by first parametrising the elliptical orbit:

$$ \vec{r}(t) = <a cos(\omega t), b sin(\omega t) >,$$ where ## a ## is the semi major axis, ## b ## the semi minor axis and ## \omega ## the average angular velocity of the Moon around the Earth. Due to the extremely low eccentricity of this orbit I just used the average angular velocity as an approximation instead of worrying about its time dependance.

To add time dependant rotations, I multiplied this vector by the rotation matrix:

$$

\begin{bmatrix}

cos(\Omega t) & sin(\Omega t) \\

-sin(\Omega t) & cos(\Omega t)

\end{bmatrix}

, $$

where ## \Omega = 2 \pi / 8.85 ## years is how fast the orbit precesses. The end result is:

$$

\begin{bmatrix}

x' \\

y'

\end{bmatrix}

=

\begin{bmatrix}

acos(\omega t)cos(\Omega t) + bsin(\omega t)sin(\Omega t) \\

-acos(\omega t)sin(\Omega t) + bsin(\omega t)cos(\Omega t)

\end{bmatrix}

$$

However, when I plot this the ellipse doesn't rotate at all. I tried changing the periods of the rotations to see the rotations come into play sooner - didn't help. I think my code is right so I'm skeptical about the physical aspect. Is my coordinate system somehow rotating with the ellipse and I therefore don't see the rotations?

I'm baffled by how this doesn't seem to work so I must be missing something basic and I'd appreciate any help. Thanks in advance.

So I approached this by first parametrising the elliptical orbit:

$$ \vec{r}(t) = <a cos(\omega t), b sin(\omega t) >,$$ where ## a ## is the semi major axis, ## b ## the semi minor axis and ## \omega ## the average angular velocity of the Moon around the Earth. Due to the extremely low eccentricity of this orbit I just used the average angular velocity as an approximation instead of worrying about its time dependance.

To add time dependant rotations, I multiplied this vector by the rotation matrix:

$$

\begin{bmatrix}

cos(\Omega t) & sin(\Omega t) \\

-sin(\Omega t) & cos(\Omega t)

\end{bmatrix}

, $$

where ## \Omega = 2 \pi / 8.85 ## years is how fast the orbit precesses. The end result is:

$$

\begin{bmatrix}

x' \\

y'

\end{bmatrix}

=

\begin{bmatrix}

acos(\omega t)cos(\Omega t) + bsin(\omega t)sin(\Omega t) \\

-acos(\omega t)sin(\Omega t) + bsin(\omega t)cos(\Omega t)

\end{bmatrix}

$$

However, when I plot this the ellipse doesn't rotate at all. I tried changing the periods of the rotations to see the rotations come into play sooner - didn't help. I think my code is right so I'm skeptical about the physical aspect. Is my coordinate system somehow rotating with the ellipse and I therefore don't see the rotations?

I'm baffled by how this doesn't seem to work so I must be missing something basic and I'd appreciate any help. Thanks in advance.

Last edited by a moderator: