Circumference of an EllipseCollected by Paul BourkeCorrections and contributions by David Cantrell. Contribution by Bill Gran: gran.png and a nifty little Excel Calculator: GRAN_Method_Calculator.xlsx.zip. !-- Appears in ANC-5 Strength of Metal Aircraft Elements March 1955 Revised Edition Section 1.535, pages 11-13 --> Paper by Paul Abbott: Abbott.pdf.
Adjustments to
Ramanujan's formula and tables
Ramanujan.xls.zip by Hassan Abed,
Ellipse Perimeter Estimation by Necat Tasdelen: Necat.pdf |
![]() a - Major axis radius b - Minor axis radius e - eccentricity = (1 - b2 / a2)1/2 f - focus = (a2 - b2)1/2 h = (a - b)2 / (a + b)2 area = pi a b |
The following lists and evaluates some of the approximations that can be used to calculate the circumference of an ellipse. To some, perhaps surprising that there is not a simple closed solution, as there is for the special case, a circle. All the expressions below reduce to the equation of a circle when a=b. Most (not not all) perform more poorly as the ratio b/a increases.
Anonymous
Ramanujan, first approximation
Ramanujan, second approximation
This is one of the more accurate approximation presented here although it degrades for large b/a ratios.
Hudson
This does not use any computationally expensive functions.
Holder mean
Similarly for low eccentricities (Muir, 1883).
David Cantrell
There is an exact series expansion but it converges rather slowly and it has numerical issues due to the need for large factorials.
| infinity | |||||
| 2 pi a |
| ||||
| i = 0 |
Necat Tasdelen
Various approximations are provided by Necat Tasdelen, they consist of improved estimates of "s" for what is referred to as the Holder method above. Three estimates of "s" are provided in the examples below, a constant value (same as Holder), a linear, and a power fit estimate. The later is one of the more accurate approximations presented here for extreme eccentricities. For the further details the reader is directed to the documents above.
SoftwareThis simple C code evaluates the various estimates given above. Some example output is given below.
All methods give exactestimates for a circle, for example, a unit circle.
This is hardly unexpected since they reduce to the equation of a circle for a=b.
For exmaple: a=1, b=1.
e : 0.000000000000000 h : 0.000000000000000 b/a: 1.000000000000000 Numerical : 6.276727658227595 error: 0.1027766752% ( 10 segments) Numerical : 6.283120710969069 error: 0.0010280806% ( 100 segments) Numerical : 6.283184661215471 error: 0.0000102809% ( 1000 segments) Numerical : 6.283185300720787 error: 0.0000001028% ( 10000 segments) Numerical : 6.283185307106803 error: 0.0000000012% ( 100000 segments) Numerical : 6.283185307179288 error: 0.0000000000% ( 1000000 segments) Numerical : 6.283185307179465 error: 0.0000000000% ( 10000000 segments) Integral : 6.911503837897545 error: 10.000000000% ( 10 segments) Integral : 6.346017160251373 error: 1.0000000000% ( 100 segments) Integral : 6.289468492486653 error: 0.1000000000% ( 1000 segments) Integral : 6.283813625711148 error: 0.0100000000% ( 10000 segments) Integral : 6.283248139028935 error: 0.0009999999% ( 100000 segments) Integral : 6.283191590340724 error: 0.0000999996% ( 1000000 segments) Integral : 6.283185934361875 error: 0.0000099819% ( 10000000 segments) Circle circumference : 6.283185307179586 error: 0.0000000000% Anonymous : 6.283185307179586 error: 0.0000000000% Hudson : 6.283185307179586 error: 0.0000000000% Ramanujan 1 : 6.283185307179586 error: 0.0000000000% Ramanujan 11 : 6.283185307179586 error: 0.0000000000% Holder mean : 6.283185307179586 error: 0.0000000000% (s: 1.534928535661375) Cantrell : 6.283185307179586 error: 0.0000000000% (s: 0.829896183162743) Exact : 6.283185307179586 error: 0.0000000000% (05 terms) Exact : 6.283185307179586 error: 0.0000000000% (15 terms) Exact : 6.283185307179586 error: 0.0000000000% (25 terms) Exact : 6.283185307179586 error: 0.0000000000% (35 terms) Exact : 6.283185307179586 error: 0.0000000000% (45 terms) Exact : 6.283185307179586 error: 0.0000000000% (55 terms) Exact : 6.283185307179586 error: 0.0000000000% (65 terms) Necat (constant s) : 6.283185307179586 error: 0.0000000000% (s: 1.534928535661375) Necat (linear s) : 6.283185307179577 error: 0.0000000000% (s: 1.534928535661380) Necat (power s) : 6.283185307179577 error: 0.0000000000% (s: 1.534928535661380) |
For modest eccentricity it is hard to beat the second Ramanujan method.
For example: a=1, b=2.
e : 0.866025403784439 h : 0.111111111111111 b/a: 2.000000000000000 Numerical : 9.678490755609781 error: 0.1027766750% ( 10 segments) Numerical : 9.688348615489051 error: 0.0010280806% ( 100 segments) Numerical : 9.688447224494045 error: 0.0000102809% ( 1000 segments) Numerical : 9.688448210587177 error: 0.0000001028% ( 10000 segments) Numerical : 9.688448220447853 error: 0.0000000010% ( 100000 segments) Numerical : 9.688448220546617 error: 0.0000000000% ( 1000000 segments) Numerical : 9.688448220549542 error: 0.0000000000% ( 10000000 segments) Anonymous : 9.683038872706693 error: 0.0558329644% Hudson : 9.688447344195666 error: 0.0000090453% Ramanujan 1 : 9.688421097671288 error: 0.0002799507% Ramanujan 11 : 9.688448216130084 error: 0.0000000456% Holder mean : 9.704481630643514 error: 0.1654899704% (s: 1.534928535661375) Cantrell : 9.688548066366097 error: 0.0010305656% (s: 0.829896183162743) Exact : 9.732823473792891 error: 0.4580222987% (05 terms) Exact : 9.688811617374823 error: 0.0037508259% (15 terms) Exact : 9.688456258824241 error: 0.0000829676% (25 terms) Exact : 9.688448461871864 error: 0.0000024908% (35 terms) Exact : 9.688448228990511 error: 0.0000000871% (45 terms) Exact : 9.688448220871699 error: 0.0000000033% (55 terms) Exact : 9.688448220560909 error: 0.0000000001% (65 terms) Necat (constant s) : 9.704481630643514 error: 0.1654899704% (s: 1.534928535661375) Necat (linear s) : 9.688041659954626 error: 0.0041963438% (s: 1.541982035153419) Necat (power s) : 9.688394411411840 error: 0.0005553948% (s: 1.541829751678717) |
For higher eccenticities the power law estimates of "s" by Necat Tasdelen performs well.
For example: a=1, b=10.
e : 0.994987437106620 h : 0.669421487603306 b/a: 10.000000000000000 Numerical : 40.600423218783128 error: 0.0967490946% ( 10 segments) Numerical : 40.639323991699108 error: 0.0010280806% ( 100 segments) Numerical : 40.639737622902992 error: 0.0000102809% ( 1000 segments) Numerical : 40.639741759227967 error: 0.0000001028% ( 10000 segments) Numerical : 40.639741800591807 error: 0.0000000011% ( 100000 segments) Numerical : 40.639741801003971 error: 0.0000000000% ( 1000000 segments) Numerical : 40.639741801007737 error: 0.0000000000% ( 10000000 segments) Anonymous : 39.924192049131456 error: 1.7607143160% Hudson : 40.631510072703506 error: 0.0202553657% Ramanujan 1 : 40.605525185140969 error: 0.0841949638% Ramanujan 11 : 40.639272100188720 error: 0.0011557673% Holder mean : 40.756585665303184 error: 0.2875113352% (s: 1.534928535661375) Cantrell : 40.632662381020694 error: 0.0174199433% (s: 0.819493675056663) Exact : 42.558928719012194 error: 4.7224387581% (05 terms) Exact : 41.090647252069871 error: 1.1095184936% (15 terms) Exact : 40.854010075119710 error: 0.5272382761% (25 terms) Exact : 40.764758000631105 error: 0.3076205558% (35 terms) Exact : 40.720480612660481 error: 0.1986695979% (45 terms) Exact : 40.695186467303650 error: 0.1364296716% (55 terms) Exact : 40.679426526109758 error: 0.0976500424% (65 terms) Necat (constant s) : 40.756585665303184 error: 0.2875113352% (s: 1.534928535661375) Necat (linear s) : 40.641175436704444 error: 0.0035276693% (s: 1.591286056206585) Necat (power s) : 40.639910838645420 error: 0.0004159417% (s: 1.591960989144423) |
One further extreme case.
For example: a = 1, b = 1000
e : 0.999999499999875 h : 0.996007988015980 b/a: 1000.000000000000000 Numerical : 4000.007006228309365 error: 0.0002145460% ( 10 segments) Numerical : 4000.011603437121266 error: 0.0000996162% ( 100 segments) Numerical : 4000.015201682681891 error: 0.0000096604% ( 1000 segments) Numerical : 4000.015583992323627 error: 0.0000001027% ( 10000 segments) Numerical : 4000.015588063635278 error: 0.0000000010% ( 100000 segments) Numerical : 4000.015588104466133 error: 0.0000000001% ( 1000000 segments) Numerical : 4000.015588105085044 error: 0.0000000001% ( 10000000 segments) Anonymous : 3848.933749811982580 error: 3.7770312381% Hudson : 3992.686249062404386 error: 0.1832327619% Ramanujan 1 : 3983.740477958850533 error: 0.4068761680% Ramanujan 11 : 3998.501894228700166 error: 0.0378421994% Holder mean : 4000.064741736551241 error: 0.0012288361% (s: 1.534928535661375) Cantrell : 4000.016918381665164 error: 0.0000332569% (s: 0.819493675056663) Exact : 4228.037343055709243 error: 5.7005216588% (05 terms) Exact : 4069.553600454411480 error: 1.7384435341% (15 terms) Exact : 4041.026960512670485 error: 1.0252803147% (25 terms) Exact : 4029.094642995526556 error: 0.7269735393% (35 terms) Exact : 4022.539816041154154 error: 0.5631035041% (45 terms) Exact : 4018.395857104054812 error: 0.4595049344% (55 terms) Exact : 4015.539317782494891 error: 0.3880917296% (65 terms) Necat (constant s) : 4000.064741736551241 error: 0.0012288361% (s: 1.534928535661375) Necat (linear s) : 4000.019625274127065 error: 0.0001009289% (s: 1.693487200718331) Necat (power s) : 4000.018954672834752 error: 0.0000841639% (s: 1.698124485349184) |
Considering ratios of a/b from 1 to 100, one can determine the maximum percentage error for each technique. The "ground truth" for these error estimates is a discrete line segment approximation made up from 100 million segment.
Algorithm : Maximum % error ----------------------------------- Anonymous : 3.51035877% Hudson : 0.14265947% Ramanujan 1 : 0.34202806% Ramanujan 11 : 0.02389770% Holder mean : 0.36189884% Cantrell : 0.02104317% Exact 65 terms : 0.37455800% Necat constant : 0.36189884% Necat linear : 0.00520088% Necat power : 0.00224446% |
One can also map the maximum percentage error as the ratio b/a increases.
: Algorithm
b/a : Anon Hudson Ram 1 Ram 11 Holder Cant Exact Necat c Necat l Necat p
---------------------------------------------------------------------------------------------------
1.00: 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
1.50: 0.0074 0.0000 0.0000 0.0000 0.0661 0.0001 0.0000 0.0661 0.0021 0.0000
2.00: 0.0558 0.0000 0.0003 0.0000 0.1655 0.0010 0.0000 0.1655 0.0042 0.0006
2.50: 0.1492 0.0001 0.0013 0.0000 0.2444 0.0027 0.0000 0.2444 0.0049 0.0014
3.00: 0.2712 0.0003 0.0034 0.0000 0.2979 0.0048 0.0000 0.2979 0.0049 0.0019
3.50: 0.4066 0.0006 0.0066 0.0000 0.3312 0.0070 0.0002 0.3312 0.0044 0.0021
4.00: 0.5457 0.0012 0.0107 0.0000 0.3502 0.0091 0.0010 0.3502 0.0037 0.0021
4.50: 0.6826 0.0020 0.0156 0.0000 0.3594 0.0110 0.0028 0.3594 0.0029 0.0020
5.00: 0.8143 0.0031 0.0211 0.0001 0.3619 0.0128 0.0062 0.3619 0.0021 0.0018
5.50: 0.9391 0.0043 0.0271 0.0001 0.3600 0.0143 0.0112 0.3600 0.0012 0.0016
6.00: 1.0566 0.0057 0.0333 0.0002 0.3552 0.0157 0.0179 0.3552 0.0005 0.0013
6.50: 1.1667 0.0072 0.0397 0.0003 0.3485 0.0168 0.0259 0.3485 0.0003 0.0011
7.00: 1.2697 0.0089 0.0462 0.0004 0.3407 0.0178 0.0349 0.3407 0.0009 0.0009
7.50: 1.3658 0.0106 0.0527 0.0005 0.3321 0.0220 0.0448 0.3321 0.0015 0.0006
8.00: 1.4557 0.0125 0.0592 0.0006 0.3232 0.0210 0.0551 0.3232 0.0020 0.0004
8.50: 1.5396 0.0144 0.0656 0.0007 0.3141 0.0201 0.0657 0.3141 0.0025 0.0002
9.00: 1.6182 0.0163 0.0719 0.0008 0.3051 0.0192 0.0765 0.3051 0.0029 0.0000
9.50: 1.6917 0.0183 0.0781 0.0010 0.2962 0.0183 0.0871 0.2962 0.0032 0.0002
10.00: 1.7607 0.0203 0.0842 0.0012 0.2875 0.0174 0.0977 0.2875 0.0035 0.0004
10.50: 1.8255 0.0222 0.0901 0.0013 0.2791 0.0166 0.1079 0.2791 0.0038 0.0006
11.00: 1.8865 0.0242 0.0959 0.0015 0.2709 0.0159 0.1179 0.2709 0.0040 0.0007
11.50: 1.9439 0.0262 0.1016 0.0017 0.2630 0.0151 0.1276 0.2630 0.0042 0.0009
12.00: 1.9980 0.0282 0.1070 0.0019 0.2554 0.0144 0.1369 0.2554 0.0044 0.0010
12.50: 2.0491 0.0302 0.1124 0.0021 0.2481 0.0138 0.1459 0.2481 0.0046 0.0011
13.00: 2.0975 0.0321 0.1176 0.0023 0.2411 0.0132 0.1545 0.2411 0.0047 0.0012
13.50: 2.1433 0.0340 0.1226 0.0025 0.2344 0.0126 0.1627 0.2344 0.0048 0.0013
14.00: 2.1867 0.0359 0.1275 0.0027 0.2280 0.0121 0.1706 0.2280 0.0049 0.0014
14.50: 2.2280 0.0378 0.1322 0.0029 0.2218 0.0116 0.1781 0.2218 0.0050 0.0015
15.00: 2.2672 0.0396 0.1368 0.0031 0.2159 0.0111 0.1853 0.2159 0.0050 0.0016
15.50: 2.3045 0.0414 0.1413 0.0033 0.2102 0.0106 0.1922 0.2102 0.0051 0.0017
16.00: 2.3401 0.0432 0.1457 0.0035 0.2048 0.0102 0.1987 0.2048 0.0051 0.0017
16.50: 2.3740 0.0449 0.1499 0.0037 0.1995 0.0098 0.2050 0.1995 0.0051 0.0018
17.00: 2.4064 0.0466 0.1540 0.0039 0.1945 0.0094 0.2110 0.1945 0.0052 0.0018
17.50: 2.4374 0.0483 0.1580 0.0042 0.1897 0.0090 0.2166 0.1897 0.0052 0.0019
18.00: 2.4670 0.0499 0.1618 0.0044 0.1851 0.0087 0.2221 0.1851 0.0052 0.0019
18.50: 2.4953 0.0516 0.1656 0.0046 0.1807 0.0083 0.2273 0.1807 0.0052 0.0020
19.00: 2.5225 0.0531 0.1692 0.0048 0.1764 0.0080 0.2322 0.1764 0.0052 0.0020
19.50: 2.5486 0.0547 0.1728 0.0050 0.1724 0.0077 0.2370 0.1724 0.0052 0.0020
20.00: 2.5736 0.0562 0.1763 0.0052 0.1684 0.0074 0.2415 0.1684 0.0052 0.0021
20.50: 2.5977 0.0577 0.1796 0.0055 0.1646 0.0072 0.2458 0.1646 0.0052 0.0021
21.00: 2.6208 0.0592 0.1829 0.0057 0.1610 0.0069 0.2500 0.1610 0.0052 0.0021
21.50: 2.6431 0.0606 0.1861 0.0059 0.1575 0.0067 0.2539 0.1575 0.0051 0.0021
22.00: 2.6645 0.0620 0.1892 0.0061 0.1541 0.0064 0.2577 0.1541 0.0051 0.0022
22.50: 2.6852 0.0634 0.1922 0.0063 0.1508 0.0062 0.2614 0.1508 0.0051 0.0022
23.00: 2.7051 0.0648 0.1951 0.0065 0.1477 0.0060 0.2649 0.1477 0.0051 0.0022
23.50: 2.7244 0.0661 0.1980 0.0067 0.1447 0.0058 0.2682 0.1447 0.0050 0.0022
24.00: 2.7429 0.0674 0.2008 0.0069 0.1417 0.0056 0.2714 0.1417 0.0050 0.0022
24.50: 2.7609 0.0687 0.2035 0.0072 0.1389 0.0054 0.2745 0.1389 0.0050 0.0022
25.00: 2.7782 0.0699 0.2061 0.0074 0.1362 0.0052 0.2775 0.1362 0.0049 0.0022
25.50: 2.7950 0.0712 0.2087 0.0076 0.1335 0.0051 0.2803 0.1335 0.0049 0.0022
26.00: 2.8112 0.0724 0.2112 0.0078 0.1310 0.0049 0.2830 0.1310 0.0049 0.0022
26.50: 2.8269 0.0736 0.2137 0.0080 0.1285 0.0047 0.2857 0.1285 0.0048 0.0022
27.00: 2.8421 0.0747 0.2161 0.0082 0.1261 0.0046 0.2882 0.1261 0.0048 0.0022
27.50: 2.8569 0.0758 0.2185 0.0084 0.1238 0.0045 0.2906 0.1238 0.0048 0.0022
28.00: 2.8712 0.0770 0.2208 0.0086 0.1215 0.0043 0.2930 0.1215 0.0047 0.0022
28.50: 2.8851 0.0781 0.2230 0.0088 0.1193 0.0042 0.2952 0.1193 0.0047 0.0022
29.00: 2.8985 0.0791 0.2252 0.0089 0.1172 0.0041 0.2974 0.1172 0.0047 0.0022
29.50: 2.9116 0.0802 0.2273 0.0091 0.1152 0.0039 0.2995 0.1152 0.0046 0.0022
30.00: 2.9243 0.0812 0.2294 0.0093 0.1132 0.0038 0.3016 0.1132 0.0046 0.0022
|