Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have ellipses that are not aligned with the x-axis and are not centered at the origin. Hence, their defined by either of the following two equations:

$\left(\frac{(x-x_{centroid})*Cos[\theta]+(y-y_{centroid})*Sin[\theta]}{r_{major}}\right)^2+\left(\frac{(y-y_{centroid})*Cos[\theta]-(x-x_{centroid})*Sin[\theta]}{r_{minor}}\right)^2 = 1$


$A \cdot x^2+B \cdot xy+C \cdot y^2+D \cdot x+E\cdot y+F=0$

The ellipses are completely defined.

Is there a fast method to determine their major and minor axis as well as the angle the major axis is oriented off the x-axis?

I currently have a computational solver which solves the maximum and minimum distance from the center of the ellipse to the ellipse surface, however, it is not very efficient and takes a rather long time. Hence, an explicit equation would be much better to work with.

Thank you very much for any input.

share|cite|improve this question
up vote 0 down vote accepted

Found the solution online here:

Summarized here;

For the general form of the ellipse equation:


The semi-axes lengths are:



share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.