MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: circumference of an ellipse

  • To: mathgroup at
  • Subject: [mg19314] Re: [mg19299] circumference of an ellipse
  • From: "Tomas Garza" <tgarza at>
  • Date: Sat, 14 Aug 1999 23:42:47 -0400
  • Sender: owner-wri-mathgroup at

M.J.M. Maes [mar.maes at] wrote:

> I made a little spreadsheetfile to calculate the circumference (length) of
> an ellipse using an iterative process.
> When I compare the results with the results of a formula to
> approximate the
> lenght
>  - which is pi(3(a+b)-sqrt((a+3b)(3a+b))) - the difference is
> greater then I
> expected (a few percents).
> This may be a shortcoming of the approximation formula, or of my
> worksheetformulae.
> Could someone please give me the exact results (in 10 or 15
> digits) of some
> examples?
> a=2; b=1
> a=5; b=1
> a=100; b=26

Several people have already given the answer to this problem, and Allan
Hayes among them provides a neat, straightforward solution [mg19292]. I
thought it might be useful to suggest an approximation based on the plot
points. The equation for the ellipse is

Clear[f]; f[x_, a_, b_] := b*Sqrt[1 - (x/a)^2]

and its plot (or, rather, the upper half of its plot) is obtained through

halfCircum = Plot[f[x, 1, 1], {x, -1, 1}];

This case is, of course, a circle of radius 1. The plot is constructed by a
number of lines joining succesive points along the circumference. These
points are extracted and the length of the line joining successive pairs of
points is then calculated:

       ptseq = Cases[halfCircum, Line[{x__}] -> x, Infinity];

       pairs = MapThread[
      List, {ptseq, Partition[Flatten[{Rest[ptseq], First[ptseq]}], 2]}];

dist[{a_, b_}] := Sqrt[Plus @@ ((a - b)^2)]

2*Plus @@ (dist /@ Drop[pairs, -1])

(The factor 2 takes into account the other half of the circumference)


which is roughly 2 Pi, with an error of less than 3/10000. This simple
procedure gives the following results for other cases:

a = 2, b = 1; Plot approximation: 9.68828    Exact to 30 decimals (Hayes):

a = 5, b = 1; Plot approximation: 21.0098   Exact (Hayes):

a = 100, b = 20; Plot approximation: 420.196   Exact (Hayes):

Tomas Garza
Mexico City

  • Prev by Date: Re: Subscripts, Doh!!!
  • Next by Date: trouble with SurfaceColor
  • Previous by thread: Re: circumference of an ellipse
  • Next by thread: Re: circumference of an ellipse