Plotting a rotating ellipse trajectory (the Moon orbiting the Earth in 2D)

kiloNewton
Messages
5
Reaction score
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 dependent 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:
Physics news on Phys.org
I think you've done it right. I coded it up and the orbit rotates. See the attached plots. I made the eccentricity large enough so I could see it. if you didn't do that, maybe you just can't see it rotating?
Orbits.png
 
  • Like
Likes berkeman
Oh wow you are completely right. The eccentricity is way too low to actually notice it rotating... Thanks a bunch for the help, turns out I'm just a dumdum.
 
  • Like
Likes berkeman

Similar threads

  • · Replies 10 ·
Replies
10
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 40 ·
2
Replies
40
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K