# Ellipse

In mathematics, an ellipse (from the Greek for absence) is a plane algebraic curve where the sum of the distances from any point on the curve to two fixed points is constant. The two fixed points are called foci (plural of focus).

An ellipse is a type of conic section: if a cone is cut with a plane which does not intersect the cone's base, the intersection of the cone and plane is an ellipse. For a short elementary proof of this, see Dandelin spheres.

Algebraically, an ellipse is a curve in the Cartesian plane defined by an equation of the form

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

such that $\displaystyle B^2 < 4 AC$ , where all of the coefficients are real, and where more than one solution, defining a pair of points (x, y) on the ellipse, exists.

An ellipse can be drawn with two pins, a loop of string, and a pencil. The pins are placed at the foci and the pins and pencil are enclosed inside the string. The pencil is placed on the paper inside the string, so the string is taut. The string will form a triangle. If the pencil is moved around so that the string stays taut, the sum of the distances from the pencil to the pins will remain constant, satisfying the definition of an ellipse.

File:Ellipse Animation Small.gif
Animation of an ellipse.

The line segment which passes through the foci and terminates on the ellipse is called the major axis. The major axis is along the longest segment that passes through the ellipse. The line which passes through the center (halfway between the foci), at right angles to the major axis, is called the minor axis. A semimajor axis is one half the major axis: the line segment from the center, through a focus, and to the edge of the ellipse. Likewise, the semiminor axis is one half the minor axis.

If the two foci coincide, then the ellipse is a circle; in other words, a circle is a special case of an ellipse, one where the eccentricity is zero.

## Parametrisation

The size of an ellipse is determined by two constants, conventionally denoted a and b. The constant a equals the length of the semimajor axis; the constant b equals the length of the semiminor axis.

An ellipse centered at the origin of an x-y coordinate system with its major axis along the x-axis is defined by the equation

$\displaystyle \frac{x^{2}}{a^{2}} + \frac{y^{2}}{b^{2}} = 1$

The derivation of this formula is quite instructive and not overly difficult.

The following diagram shows an ellipse demonstrating the Pythagoras equation a² = b² + c² as a special case of the non-parametric equation above (x=0, y=b).

The same ellipse is also represented by the parametric equations:

$\displaystyle x = a\,\cos t$
$\displaystyle y = b\,\sin t$
$\displaystyle 0 \leq t < 2\pi$

which use the trigonometric functions sine and cosine.

If an ellipse is not centered at the origin of an x-y coordinate system, but again has its major axis along the x-axis, it may be specified by the equation

$\displaystyle \frac{(x-h)^{2}}{a^{2}} + \frac{(y-k)^{2}}{b^{2}} = 1$

where (h,k) is the center.

A Gauss-mapped form:

$\displaystyle \left(\frac{a^2\cos\phi}{\sqrt{a^2\cos^2\phi+b^2\sin^2\phi}},\frac{b^2\sin\phi}{\sqrt{a^2\cos^2\phi+b^2\sin^2\phi}}\right)$

has normal $\displaystyle (\cos\phi,\sin\phi)$ .

## Eccentricity

The shape of an ellipse is usually expressed by a number called the eccentricity of the ellipse, conventionally denoted e (not to be confused with the mathematical constant e). The eccentricity is related to a and b by the statement

$\displaystyle e = \sqrt{1 - \frac{b^2}{a^2}}$

or where $\displaystyle c$ (the linear eccentricity of the ellipse) equals the distance from the center to either focus

$\displaystyle e = \frac{c}{a}$

The eccentricity is a positive number less than 1, or 0 in the case of a circle. The greater the eccentricity is, the larger the ratio of a to b is, and therefore the more elongated the ellipse is. The ellipse shown in the image below has an eccentricity of approximately 0.8733. The distance between the foci is 2ae.

## Semi-latus rectum and polar coordinates

The semi-latus rectum of an ellipse, usually denoted $\displaystyle l\,\!$ (lowercase L), is the distance from a focus of the ellipse to the ellipse itself, measured along a line perpendicular to the major axis. It is related to $\displaystyle a\,\!$ and $\displaystyle b\,\!$ (the ellipse's semi-axes) by the formula $\displaystyle al=b^2\,\!$ or, if using the eccentricity, $\displaystyle l=a(1-e^2)\,\!$ .

In polar coordinates, an ellipse with one focus at the origin and the other on the negative x-axis is given by the equation

$\displaystyle r (1 + e \cos \theta) = l \,\!$

An ellipse can also be thought of as a projection of a circle: a circle on a plane at angle φ to the horizontal projected vertically onto a horizontal plane gives an ellipse of eccentricity sin φ, provided φ is not 90°.

## Area

The area enclosed by an ellipse is $\displaystyle \pi ab\,\!$ , where $\displaystyle \pi$ is Archimedes' constant.

## Circumference

The circumference of an ellipse is 4aE(e), where the function E is the complete elliptic integral of the second kind.

The exact infinite series is:

$\displaystyle c = 2\pi a \left[{1 - \left({1\over 2}\right)^2e^2 - \left({1\cdot 3\over 2\cdot 4}\right)^2{e^4\over 3} - \left({1\cdot 3\cdot 5\over 2\cdot 4\cdot 6}\right)^2{e^6\over5} - \dots}\right]\!\,$

A good approximation is Ramanujan's:

$\displaystyle c \approx \pi \left[3(a+b) - \sqrt{(3a+b)(a+3b)}\right]\!\,$

which can also be written as:

$\displaystyle c \approx \pi a \left[ 3 (1+\sqrt{1-e^2}) - \sqrt{(3+ \sqrt{1-e^2})(1+3 \sqrt{1-e^2})} \right] \!\,$

More generally, the arc length of a portion of the circumference, as a function of the angle subtended, is given by an incomplete elliptic integral. The inverse function, the angle subtended as a function of the arc length, is given by the elliptic functions.

## Reflection property

Assume an elliptic mirror with a light source at one of the foci. Then all rays are reflected to a single point — the second focus. Since no other curve has such a property, it can be used as an alternative definition of an ellipse.

## Ellipses in physics

Johannes Kepler discovered that the orbits along which the planets travel around the Sun are ellipses. This is Kepler's first law. Later, Isaac Newton explained this fact as a corollary of his law of universal gravitation.

More generally, in the gravitational two-body problem, if the two bodies are bound to each other (i.e., the total energy is negative), their orbits are similar ellipses with the common barycenter being one of the foci of each ellipse.

The general solution for a harmonic oscillator in two or more dimensions is also an ellipse, but this time with the origin of the force located in the center of the ellipse.

Albert Einstein also used the ellipse to prove his theory of relativity by using an elliptical shaped mass. Einstein's contributions to modern physics may not have been discovered if it were not for ellipses.

## Ellipses in computer graphics

Drawing an ellipse is a common graphics primitive in standard display libraries, such as the Quickdraw and GDI interfaces on the Macintosh and Windows systems.

Jack Bresenham at IBM is most famous for the invention of 2D drawing primitives, including line and circle drawing, using only fast integer operations such as addition and branch on carry bit. An efficient generalization to draw ellipses was invented in 1984 by Jerry Van Aken (IEEE CG&A, Sept. 1984). A more challenging task is to perform these drawing operations with antialiasing, to create a smooth-looking curve. The curve drawing algorithms of Xiaolin Wu (SIGGRAPH 91) are an example.