Perimeter of Ellipse

A1 A2

The circumference or perimeter of an ellipse can be calculated using various formulae, however some of them are approximations only.

We will construct a JavaScript function using a formula which provides an exact answer.

First we calculate "h":
h = (a-b)²
    ¯¯¯¯¯¯
    (a+b)²
where a and b are the semi-major and semi-minor axes (radii of the ellipse).

Then use an "approximate" formula developed by Ramanujan:
p ≅ 𝛑 (a+b) * (1 + (3h / 10 + √4-3h))

In our case
a=90
b=60

h = 30² / 150²
  = 900 / 22500
  = 0.04

p ≅ 150𝛑 * (1 + (.12 / 10 + √4-.12) )
    150𝝅 * (1 + (.12 / 11.97))
    150𝛑 * 1.01
    475.963

NB: The exact value is 475.9631877 (from Math Is Fun)

Foci of ellipse: c² = a² - b² where
a = major axis; b = minor axis (from center to the edge)
c = distance from center to each focus

c² = 8100 - 3600 = 4500 c = 67.08

Every ellipse has 2 foci, which we have calculated and indicate as the 2 red dots in the illustration.