# Circumference

The circumference is the distance around a closed curve. Circumference is a kind of perimeter.

### Circle

The circumference of a circle can be calculated from its diameter using the formula:

$\displaystyle c = \pi d$

Or, substituting the radius for the diameter:

$\displaystyle c = 2r\pi$

Where r is the radius and d is the diameter of the circle, and π (the Greek letter pi) is the constant 3.141 592 6...

### Ellipse

The circumference of an ellipse is more problematical, the exact solution being an infinite series. A good approximation is Ramanujan's:

$\displaystyle c \approx \pi (3(a+b) - \sqrt{(3a+b)(a+3b)})$

where $\displaystyle a$ and $\displaystyle b$ are the ellipse's semi-major and semi-minor axes, respectively. The two are related by the ellipse's eccentricity as follows:

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

Which means the circumference can also be written as:

$\displaystyle c \approx \pi a (3(1+\sqrt{1-e^2}) - \sqrt{(3+ \sqrt{1-e^2})(1+3 \sqrt{1-e^2})}) = \pi a (3(1+\sqrt{1-e^2}) - \sqrt{3(2-e^2)+10 \sqrt{1-e^2}})$