how do I find the angle of rotation of the major axis of an ellipse given its bounding rectangle?

GSS1 picture GSS1 · Sep 25, 2008 · Viewed 8.8k times · Source

I have an ellipse centered at (0,0) and the bounding rectangle is x = [-5,5], y = [-6,6]. The ellipse intersects the rectangle at (-5,3),(-2.5,6),(2.5,-6),and (5,-3)

I know nothing else about the ellipse, but the only thing I need to know is what angle the major axis is rotated at.

seems like the answer must be really simple but I'm just not seeing it... thanks for the help!

Answer

paxdiablo picture paxdiablo · Sep 25, 2008

The gradient of the ellipse is identical to the gradient of the intersects with the bounding rectangle along one side of the ellipse. In your case, that's the line from (-2.5,6) to (5,-3), the top side of your ellipse. That line has a vertical drop of 9 and a horizontal run of 7.5.

So we end up with the following right-angled triangle.

(-2.5,6)
  *-----
  |\x
  | \
  |  \
9 |   \
  |    \
  |    x\
  +------* (5,-3)
    7.5

The angle we're looking for is x which is the same in both locations.

We can calculate it as:

   -1
tan   (9/7.5)

which gives us an angle of -50.19 degrees