0

I looked at some posts on this website and on Wikipedia for a derivation on the general form of a 2D rotated ellipse, but I've only come across an explanation for the parametric form. Could someone please walk me through the solution to the general form as shown by ankidat dennis (2nd equation shown) here:

What is the general equation of the ellipse that is not in the origin and rotated by an angle?

Thanks,

reacher33

1 Answers1

0

If you want to rotate first (by $\theta$ CCW), then translate (by $(h,k)$), you get \begin{align*} (x,y)&\xrightarrow{\text{rotate}}(x\cos\theta+y\sin\theta, -x\sin\theta+y\cos\theta)\\&\xrightarrow{\text{translate}}(x\cos\theta+y\sin\theta-h, -x\sin\theta+y\cos\theta-k). \end{align*} If you want to translate first, then rotate, you get \begin{align*} (x,y)&\xrightarrow{\text{translate}}(x-h,y-k)\\&\xrightarrow{\text{rotate}}((x-h)\cos\theta+(y-k)\sin\theta, -(x-h)\sin\theta+(y-k)\cos\theta) \end{align*}

yoyo
  • 9,943
  • thanks yoyo, I understand the rotation process via a rotation matrix, and the translation steps but what I'm looking for are the individual steps (equations) starting with the standard definition of an ellipse https://simple.wikipedia.org/wiki/Ellipse and ending with the equation by ankidat dennis linked to in my original post – reacher33 Apr 02 '21 at 01:04
  • I pretty much found the walkthrough for the "general form" equation of the 2D rotated ellipse here: link What is throwing me off is the numerator in the second term. I follow the clockwise rotation resulting in (xcos(alpha) + ysin(alpha), ycos(alpha) - xsin(alpha)) but then, why is the numerator in the second term of the ellipse equation (xsin(alpha) - ycos(alpha))^2 instead of (ycos(alpha) -xsin(alpha))^2 ? – reacher33 Apr 02 '21 at 20:19
  • @reacher33 Note that $x\sin\alpha - y\cos\alpha = - (y\cos\alpha - x\sin\alpha)$, so when you square them, $(x\sin\alpha - y\cos\alpha)^2 = (y\cos\alpha - x\sin\alpha)^2$. The authors might have preferred to have $x$ appear before $y$ in an expression, hence the swapped order. – Elliot Yu Apr 02 '21 at 21:38
  • @Elliot Yu since you pulled the negative sign out in front of the parentheses, wouldn't the ellipse equation then look like: '((1/a^2)(xcos^2(alpha) + ysin^2(alpha))^2 - (1/b^2)((ycos^2(alpha)-xsin^2(alpha))^2' ? – reacher33 Apr 02 '21 at 22:00
  • @reacher33 The negative sign disappears when you square the expression. – Elliot Yu Apr 03 '21 at 01:28