Geometry – Convert a Rotated Ellipse to a Sheared Ellipse

conic sectionsgeometryparametric

Given an ellipse centred at the origin with major and minor axes and slope of the major axis specified:
rotated ellipse

How can I convert those three parameters into parameters that would express a scaled and sheared ellipse at the origin?
sheared ellipse

What I need is the width and height of the green parallelogram and the slope of the blue line when the red line is lying flat.

I might also be interested in versions with angles rather than slopes. I'm assuming it's easier with slopes but I could be wrong.

(I only have maybe highschool level maths so please excuse my ignorance of proper terminology. The images are not mine, just "close enough" ones I found on the net, the angles should actually match. I hope they are clear enough.)


Proposed rewording by @Blue.

A rotated ellipse can be interpreted as a (horizontally-)sheared ellipse. For instance, "an ellipse with radii $a$ and $b$, transformed by rotation through angle $\theta$" is just as well described as "an ellipse with radii $p$ and $q$, transformed by (horizontal) shear of angle $\phi$".

enter image description hereenter image description here

I want to know how to convert from one set of parameters to the other. That is,

$$\text{Given $a$, $b$, $\theta$, what are $p$, $q$, $\phi$?}$$

  • It may be easier to express the amount of rotation and shear as slopes rather than angles.
  • For the shear, I'm more interested the height of the bounding parallelogram ($q$ in the figure) not the transformed radius ($q^\prime$). (Of course, these are related by $q = q^\prime \sin\phi$.)

Best Answer

Recall that the standard form of an ellipse centered at the origin is $$\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1,$$ where $a$ is half the length of the horizontal axis and $b$ half the vertical (so we only need $a, b > 0$ and there is no need to specify $a > b$). Upon counterclockwise rotation by an angle $\theta$ about the origin, that is to say, $$(x,y) \to (x \cos \theta - y \sin \theta, x \sin \theta + y \cos \theta),$$ this equation takes the form $$Ax^2 + Bxy + Cy^2 = 1,$$ where $$\begin{align*} A &= \frac{\cos^2 \theta}{a^2} + \frac{\sin^2 \theta}{b^2}, \\ B &= \left(\frac{1}{a^2} - \frac{1}{b^2}\right) \sin 2\theta, \\ C &= \frac{\sin^2 \theta}{a^2} + \frac{\cos^2 \theta}{b^2}. \end{align*}$$

Now it should be obvious that the intersection of the red diameter with the ellipse in your second figure is simply the solution to $Ax^2 = 1,$ i.e. $$x = \pm \frac{1}{\sqrt{A}} = \pm \frac{ab}{\sqrt{a^2 \sin^2 \theta + b^2 \cos^2 \theta}}$$ hence the positive value is also half the length of the red diameter.

The blue diameter in the second figure corresponds to the vertical extrema; e.g., what is the largest possible choice of $y$ satisfying $Ax^2 + Bxy + Cy^2 = 1$ for any valid choice of $x$? Some thought should lead you to conclude that this occurs precisely when the quadratic in $x$ $$Ax^2 + (By)x + (Cy^2 - 1) = 0$$ has a repeated root; i.e., the discriminant $$\Delta = (By)^2 - 4A(Cy^2 - 1) = 0.$$ Thus $$y = \pm \frac{2\sqrt{A}}{\sqrt{4AC - B^2}} = \pm \sqrt{a^2 \sin^2 \theta + b^2 \cos^2 \theta}.$$ and the vertical height of the green parallelogram is twice the positive value. The slope of the blue line (after some calculations) should be $$\frac{a^2 \tan \theta + b^2 \cot \theta}{a^2 - b^2},$$ the proof of which is left as an exercise.

I strongly advise you to verify these calculations as I have not spent the time and effort to do so myself.