Re: Calculate the Circumference of an ellipse

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi J. Maybe we can expand your excellent reference to a Custom function. Here, we factor out a common expression, and add in the 2 Pi to get the Perimeter. This uses the first example from your reference:

Sub TestIt()
'// Ellipse Perimeter
Debug.Print Perimeter(10000, 9975)
End Sub

Function Perimeter(a, b)
Dim k As Double

k = 3 * ((a - b) / (a + b)) ^ 2
Perimeter = (a + b) * (1 + k / (10 + Sqr(4 - k))) * [Pi()]
End Function

Returns:
62753.3378298691

I get the same result using a math program...
a = 10000;
b = 9975.;
4*a*EllipticE[1 - b^2/a^2]

62753.3378298691`

Wow. I would say that's as good an approximation as it gets.
Thanks for the reference. :>)

Since the eccentricity is not very large, we can sense that the solution "should" be a little less than the following, which it is.
? 2*10000*[Pi()]
62831.8530717959

= = = = =
Dana DeLouis



JLatham wrote:
Disclaimer: I do not hold a degree in mathematics (heck, I flunked college algebra the first time around) and I don't even play one on TV or in any Intel advertisements. But...

You got me curious so I went searching for coded solutions to the problem and couldn't find any expressed as an Excel formula. What I did discover is that a sharp fellow by the name of Srinivasa Ramanujan came up with 2 formulas in 1914 that are now accepted as being very accurate, with the 2nd effort being the more accurate of the two. All this is shown at http://en.wikipedia.org/wiki/Circumference

So I worked at implementing his 2nd approximation as an Excel spreadsheet formula and I believe I've succeeded:
Given the ellipse's major semi-axis in B1 and
the ellipse's minor semi-axis in B2, then
=(0.5*(B1+B2))*(1+((3*((B1-B2)/(B1+B2))^2)/(10+SQRT((4-(3*((B1-B2)/(B1+B2))^2))))))
gives me results shown on that same Wiki page for the various values of b with a value of 10000 for the major semi-axis value.

Since this particular approximation appears to be the Gold Standard of all approximations for the circumference of an ellipse, hopefully it will suit your needs.


"M" wrote:

Is there a formula to Calculate the Circumference of an ellipse in excel?
.



Relevant Pages

  • Re: geography math?
    ... >>>I found this for calculating distance from 2 points given geographical ... >>I don't know what your reference is. ... >>But for higher precision you need an ellipsoidal approximation. ... When using an ellipsoidal model of the earth, ...
    (comp.lang.tcl)
  • RE: Calculate the Circumference of an ellipse
    ... algebra the first time around) and I don't even play one on TV or in any ... and couldn't find any expressed as an Excel formula. ... with a value of 10000 for the major semi-axis value. ... Since this particular approximation appears to be the Gold Standard of all ...
    (microsoft.public.excel.misc)
  • Re: asymptotic behaviour of multivariate recurrence equations?
    ... approximation it refers. ... In Fundamental Algorithms 3rd Edition there is one reference to the ... around it) there are only exact equations involving stirling numbers. ... In Graham Knuth Patashnik, Concrete Mathematics there is one referene to the ...
    (comp.theory)
  • Re: geography math?
    ... Helmut Jarausch wrote: ... > I don't know what your reference is. ... > But for higher precision you need an ellipsoidal approximation. ... When using an ellipsoidal model of the earth, ...
    (comp.lang.tcl)
  • Re: Value of "e" in the C log() function
    ... language uses in the logfunction. ... I ask as I am coparing the ... Any approximation of e used by a C implementation, however, /does/ ... develop that algorithm without reference to that base value. ...
    (comp.lang.c)