The Cartesian equation of an ellipse follows from the constant sum of its distances from its two foci. The general quadratic equation also gives its center, axis lengths, and orientation (Casey 1893).
Let an ellipse lie along the x-axis and find the equation of the ellipse defined by the focal distance sum where
and
are at
and
. In Cartesian
coordinates,
|
(1)
|
Bring the second term to the right side and square both sides,
|
(2)
|
Now solve for the square root term and simplify
|
(3)
| |||
|
(4)
| |||
|
(5)
|
Square one final time to clear the remaining square root,
|
(6)
|
Grouping the
terms then gives
|
(7)
|
which can be written in the simple form
|
(8)
|
Defining a new constant
|
(9)
|
puts the equation in the particularly simple form
|
(10)
|
The general quadratic curve
|
(11)
|
is an ellipse when, after defining
|
(12)
| |||
|
(13)
| |||
|
(14)
|
,
, and
. These conditions include a circle,
which occurs iff
and
. For the formulas below, multiply
all six coefficients by
if necessary so that
. The center
of the ellipse
is given by
|
(15)
| |||
|
(16)
|
the semimajor axis and semiminor axis lengths are
|
(17)
| |||
|
(18)
|
The counterclockwise angle of rotation from the x-axis to the major axis of the ellipse
is given modulo
by
|
(19)
|
where the inverse cotangent takes values in . For a circle,
the angle of rotation is arbitrary,
and
has been chosen.