3
$\begingroup$

I have the parametric equation of an ellipse in this form:

$$x(t)= a\cos(t)$$

$$y(t)=b\cos(t+\phi)$$

It's an ellipse centred about the origin, with a tilt angle. So three parameters.

How can I convert it to the form:

$$x(t)=A\cos(t)\cos(\Phi)-B\sin(t)\sin(\Phi)$$ $$y(t)=A\cos(t)\sin(\Phi)+B\sin(t)\cos(\Phi)$$

i.e. the ellipse formula with a rotation through $\Phi$? I obviously need to get $A$, $B$, and $\Phi$ in terms of $a$, $b$ and $\phi$, but I can't see how to do it.

$\endgroup$
6
  • $\begingroup$ on the RHS there is no $t$ ... $\endgroup$
    – user251257
    Aug 25 '15 at 15:24
  • $\begingroup$ Sorry, was using $\theta$. Changing it to a $t$ now. $\endgroup$ Aug 25 '15 at 15:25
  • $\begingroup$ then you could also replace sin with \sin and cos with \cos :) $\endgroup$
    – user251257
    Aug 25 '15 at 15:28
  • $\begingroup$ Happy now...? :) $\endgroup$ Aug 26 '15 at 7:57
  • $\begingroup$ I suppose $t$ is not the same for the two formulas? $\endgroup$
    – uranix
    Aug 26 '15 at 14:21
2
$\begingroup$

So we have a pair of equations $$ a \cos (t+\tau) = A \cos t \cos \Phi - B \sin t \sin \Phi\\ b \cos (t+\tau+\phi) = A \cos t \sin \Phi + B \sin t \cos \Phi $$ which need to be equal for every $t \in \mathbb R$. Since both of the formula produce an ellipse when $t$ runs over $[u, u+2\pi]$ for any $u$, the value $\tau$ denotes the parameter shift between the parametrizations. Expanding the LHS we get $$ a \cos t \cos \tau - a \sin t \sin \tau = A \cos t \cos \Phi - B \sin t \sin \Phi\\ b \cos t \cos(\tau+\phi) - b \sin t \sin (\tau + \phi)= A \cos t \sin \Phi + B \sin t \cos \Phi. $$ Eliminating $t$ gives a system of 4 equations: $$\begin{aligned} a \cos \tau &= A \cos \Phi &\qquad(1)\\ a \sin \tau &= B \sin \Phi &\qquad(2)\\ b \cos (\tau + \phi) &= A \sin \Phi &\qquad(3)\\ b \sin (\tau + \phi) &= -B \cos \Phi &\qquad(4) \end{aligned} $$ which need to be solved for $\tau, A, B, \Phi$. Squaring and adding $(1)$ and $(2)$ and the same for $(3), (4)$ gives $$ a^2 = A^2 \cos^2 \Phi + B^2 \sin^2 \Phi\\ b^2 = A^2 \sin^2 \Phi + B^2 \cos^2 \Phi $$ and adding and subtracting those give $$\begin{aligned} a^2 + b^2 &= A^2 + B^2\\ a^2 - b^2 &= A^2 \cos 2\Phi - B^2 \cos 2\Phi \end{aligned} $$ Also by $(1)\times(3) + (2)\times(4)$ $$ ab \left( \cos \tau \cos (\tau + \phi) +\sin \tau \sin (\tau + \phi) \right) = (A^2 - B^2) \cos \Phi \sin \Phi\\ 2ab \cos \phi = (A^2-B^2) \sin 2\Phi. $$ So $$ A^2 + B^2 = a^2 + b^2\\ (A^2 - B^2) \cos 2\Phi = a^2 - b^2\\ (A^2 - B^2) \sin 2\Phi = 2ab\cos \phi $$ Solving the system gives $$ \Phi = \frac{1}{2}\arctan \frac{2ab\cos \phi}{a^2 - b^2}\\ A^2 + B^2 = a^2 + b^2\\ A^2 - B^2 = \pm\sqrt{(a^2 - b^2)^2 + 4a^2b^2 \cos^2 \phi} = \pm\sqrt{a^4 + b^4 + 2a^2b^2\cos 2\phi}. $$ Care should be taken when choosing correct sign. Actually the sign interchanges the $A$ and $B$. Wrong sign rotates the ellipse by $\frac{\pi}{2}$. One may also add $\frac{\pi n}{2}$ to the $\Phi$ and fix the sign.

Example $a = 1, b = 2, \phi = \frac{\pi}{3}$ $$ \Phi = -\frac{1}{2}\arctan \frac{2}{3}\approx -0.294\\ B = \sqrt{\frac{5+\sqrt{13}}{2}} \approx 2.07431\\ A = \sqrt{\frac{5-\sqrt{13}}{2}} \approx 0.83500\\ $$ I've plotted both curves for $t \in \left[0, \frac{15}{8}\pi\right]$ so you can see where the cut is. enter image description here enter image description here

$\endgroup$
1
  • $\begingroup$ Outstanding! Thank you so much. I owe you a beer! $\endgroup$ Aug 26 '15 at 21:14
1
$\begingroup$

Hint:

$$\cos(t+ \phi)=\cos t\cos\phi-\sin t\sin\phi$$


Since I don't know where are the values of $a$, $b$ and $\phi$, I took $a=2$, $b=1$ and $\theta=\pi/3$ and I got this:

Graph

$\endgroup$
2
  • $\begingroup$ So now I have $y(t)=b\cos t\cos\phi-b\sin t\sin\phi$. Obviously this looks a bit like my target for $y(t)$, but I'm not sure where to go from here. $\endgroup$ Aug 26 '15 at 11:15
  • $\begingroup$ @benshepherd: It looks fine. $\endgroup$ Aug 26 '15 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.