Peter Alfeld, --- Department of Mathematics, --- College of Science --- University of Utah

Archimedes and the Computation of Pi

Archimedes (approximately 285---212 B.C.) was the most famous ancient Greek mathematician and inventor. He invented the Screw of Archimedes, a device to lift water, and played a major role in the defense of Syracuse against a Roman Siege, inventing many war machines that were so effective that they long delayed the final sacking of the city.

For a concise and yet informative discussion of Archimedes see the article "Archimedes" in the macropedia of the Encyclopedia Britannica.

Here are some links to other Archimedes related web pages:

Archimedes' mathematical work exhibits great boldness and originality in thought, as well as extreme rigor. Among his mathematical accomplishments is the computation of pi, which is the ratio of the circumference of a circle to its diameter. His approach consisted of inscribing and circumscribing regular polygons with many sides in and around the circle, and computing the perimeter of these polygons. This provided him with an upper and a lower bound for pi.

If one knows that the area of the circle equals pi times the square of the radius of the circle then one can also compute pi from that relationship. (Of course one has to prove the equivalence of these two definitions of pi.) This approach to computing was used until the late 17th century when more powerful calculus based series expansions became available.

The applet on this page allows you study Archimedes' construction graphically and interactively.

However, your browser does not support Java. If it did you would not see this message! Get a java compatible browser such as Netscape, of a sufficiently advanced version.

When you click on it two windows should pop up on the screen. The two figures nearby show what they look like.

The drawing window shows the circle in red , the inscribed polygon in green , and the circumscribed polygon in yellow . In the figure, the inscribed polygon is a pentagon and the circumscribed polygon an octagon.

The polygons are redrawn every time you specify a new number of sides, unless there are more sides than pixels on the periphery of the circle. However, the approximations of Pi displayed in the control panel are computed for any number of sides.

You can freely resize the drawing window.

Let's now discuss the five rows of the control window:

  1. Row 1:
  2. Row 2 contains two dark red text fields in which you can specify the number of sides of the inscribed and circumscribed polygons. Pushing the - or + button on the sides of the textfields causes the corresponding number to decrease or increase by 1, respectively. The smallest possible number of sides is of course 3, corresponding to a triangle.
  3. The white labels in Row 3 contain the bounds on pi based on the circumference of the circle.
  4. Row 4 similarly shows the bounds based on the area formula. The upper bound is identical to the lower bound, but the lower bound is worse than the circumference based lower bound.

Running Standalone and Downloading

You may download the byte code of this software and incorporate it into your own web pages or run it on your system in a standalone mode. You need the following Java classes:

When you click on these links (which point to binary files) you'll probably see something strange on your system. However, you should be able to download the files properly in spite of their appearance.

Pi is the class that calls all others. To run the software in standalone mode on a Unix system just type java Pi in the directory that contains your class files. If you want to base an Applet on your files make sure you specify the code base (the directory containing your class files) similarly as in the html code of this page. The code base must be accessible over the net, otherwise you get a security exception and things don't work right.

If you do download the software I invite you to let me know so that I can put you on my mailing list and inform you about future improvements. Of course, also let me know if you have any troubles.

There is no help information built into the program (at least not yet). This page is intended to be the documentation for the program. So you may want to copy the page, print it, or provide a link to it.

[01-Apr-1999]

Return to Peter Alfeld's Home Page.

Designed for netscape and Java.