# Calculating ellipse dimensions from bounding box

• Jun 27th 2011, 01:42 AM
Ferguzz
Calculating ellipse dimensions from bounding box
Imagine a rotating ellipse. A bounding box is placed around the ellipse oriented always parallel to the axes. How can I calculate the width, height and angle of rotation of this ellipse? The information I do have is the bounding box dimensions and the area of the ellipse.
• Jun 27th 2011, 05:32 AM
Soroban
Re: Calculating ellipse dimensions from bounding box
Hello, Ferguzz!

Quote:

Imagine a rotating ellipse.
A bounding box is placed around the ellipse oriented always parallel to the axes.
How can I calculate the width, height and angle of rotation of this ellipse?
The information I do have is the bounding box dimensions and the area of the ellipse.

I don't understand the difficulty.

We have an ellipsoid of revolution.
The box has length $\displaystyle L$ and height $\displaystyle H.$
The width of the box equals the height: $\displaystyle W = H.$

Code:

      : - - - - - L - - - - - :     = *---------*-*-*---------* =     : |    *      :      *    | :     : | *        :        * | :     : |*          :          *| b     : |          :          | :     : *          :          * :     H * - - - - - * - - - - - * =     : *          :          * :     : |          :          | :     : |*          :          *| b     : | *        :        * | :     : |    *      :        *  | :     = *---------*-*-*---------* =       : - - a - - | - - a - - :

The "width" of the ellipsoid is $\displaystyle L.$
The "height" of the ellipsoid is $\displaystyle H.$

An equation of the ellipse is: .$\displaystyle \frac{x^2}{a^2} + \frac{y^2}{b^2} \:=\:1$
. . where: .$\displaystyle a = \tfrac{L}{2},\;b = \tfrac{H}{2}$

"The angle of rotation" has no meaning.