I have the equation of an ellipse centred at the origin and inclined to the coordinate axes: $$ \frac{(x\cos\theta + y\sin\theta)^2}{a^2} + \frac{(y\cos\theta - x\sin\theta)^2}{b^2} = 1 $$ In order to find the rotation angle I know that: $$ \tan(2\theta)=\frac B{A-C}\ $$ Now my problem is to obtain the forms of A, B and C for the latter equation, from the former. Any help will be very welcome.

  • $\begingroup$ What's the definition of A, B and C? $\endgroup$ – NickD May 4 '17 at 18:04
  • $\begingroup$ I think it is $A x^2 + B y^2 + C x y + F=0$ and you want to get to $A' x'^2 + B' y'^2 = 1$ Is this correct? $\endgroup$ – ja72 May 4 '17 at 19:33
  • $\begingroup$ it is correct. I wrongly wrote x' and y' when I meant x and y, but in any case it is the same problem. I want to find A, B and C corresponding to the coefficients of the general equation. $\endgroup$ – P Macmutton May 4 '17 at 20:02

All you need is to explicitly write your first equation by expanding the squares and grouping terms for $x'^2$, $y'^2$, and $x'y'$. Their coefficients are $A$, $C$, and $B$. You will be surprised to see $$\tan(2\theta)=\frac{2\sin\theta\cos\theta}{\cos^2\theta-\sin^2\theta}$$ :)

  • $\begingroup$ Thanks. I did so but couldn't get to the same form. According to your answer A = cos²(theta); C = sin²(theta); and B = 2sin(theta)cos(theta). What happens to coefficients a and b? $\endgroup$ – P Macmutton May 4 '17 at 20:05
  • $\begingroup$ Sorry, just now I realized what you meant in the fraction is sin2(theta) / cos2(theta)... Thanks again, but I still do not get how to obtain the forms of A, B and C... $\endgroup$ – P Macmutton May 4 '17 at 20:17
  • $\begingroup$ $B=2 \sin \theta \cos \theta\left(\frac{1}{a^2}-\frac{1}{b^2}\right)$. $A$ and $C$ contain the same expression in $1/a^2-1/b^2$, which will cancel if $a\ne b$. But if $a=b$ then your ellipse is a circle, so there is no tilt $\endgroup$ – Andrei May 4 '17 at 20:18
  • $\begingroup$ Explicitly find terms for $x^2$, $y^2$, and $xy$. In the first equation, if you expand the squares, you get the coefficient for $x^2$ to be $A=\frac{\cos^2\theta}{a^2}+\frac{\sin^2\theta}{b^2}$. My previous comment wrongly stated that $A$ and $C$ have the same expression in $a$ and $b$. In fact only the difference $A_C$ has the same expression $\endgroup$ – Andrei May 4 '17 at 20:24
  • $\begingroup$ Thanks again Andrei, now I arrived to the same, and C=\frac{\sin^2\theta}{a^2}+\frac{\cos^2\theta}{b^2} $\endgroup$ – P Macmutton May 4 '17 at 20:55

In the world coordinates you have $$A x^2 + B y^2 + C x y - 1 = 0$$ and you want to find the parameters of the ellipse in a coordinate system that is aligned with the major/minor axis. We rotate the local coordinated by $\theta$ with:

$$ x = x' \cos\theta -y' \sin\theta \\ y = x' \sin\theta + y' \cos\theta $$

If you plug it in the ellipse equations you will find from the terms multiplying $x y$ that $$ \left. 2 C \cos^2 \theta + 2 (B-A) \sin \theta \cos\theta - C =0 \right\}\\ \left. C \cos(2 \theta)+(B-A) \sin(2 \theta) = 0 \right\}\\ \tan (2 \theta) = \frac{C}{A-B} $$

Use this angle to get the aligned ellipse

$$ \left( \tfrac{\sqrt{ (A-B)^2+C^2}+A+B}{2} \right) x'^2 + \left( \tfrac{-\sqrt{(A-B)^2+C^2}+A+B}{2} \right) y'^2 = 1 $$


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.