[Home] [Puzzles & Projects] [Delphi Techniques] [Math Topics] [Library] [Utilities]
Archimedes made a significant contribution to mathematics when he developed the first iterative method for calculating the value of Pi with greater precision that then existed. This program satisfies my curiosity about how he did it.
Background & Techniques
Here is an illustrated description of Archimedes' method for estimating Pi developed a couple of hundred years BC. Starting with circumscribed and inscribed hexagons for a given circle, he calculated the perimeters and used the ratio of each perimeter to the diameter of the given circle as an estimate of Pi ( = Circumference/Diameter). Since the circumscribed perimeter will be larger than the circumference of the circle, the derived estimate of Pi will be too large. Similarly the inscribed perimeter will be too small and produce a low estimate. As the number of sides increases, the two estimates converge towards Pi.
Archimedes started with what was probably the largest number of sides for which he knew the actual ratio of the side lengths to the diameter, a hexagon. He then cleverly derived the ratios for 12 sided regular polygons and repeated the same logic for 24, 48, and 96 sided polygons. Most online explanations of Archimedes procedure cheat and use trigonometry but here we'll do it the way Archimedes did it using only algebra and geometry. The English translation of Proposition 3 in "The Measure of a Circle" used as my source and is from "The Works of Archimedes" translated from Greek by T. L. Heath and published in 1897. A free download is available here.
After 4 iterations, Archimedes determined that the true value of Pi lies
between 310/71 and 31/7 . Decimal terminology had not yet been
developed so he used rational fraction estimates for irrational values, starting
with estimates for the square root of 3, but making sure that the error
introduced only made his estimate worse than if he could have used the true
value. Pretty smart fellow!
|Archimedes use of rational fractions raises the question: "When did the positional notation decimal system develop?" The answer from http://en.wikipedia.org/wiki/Hindu-Arabic_numeral_system is: "The Hindu–Arabic numeral system or Hindu numeral system is a positional decimal numeral system developed by the 9th century by Indian mathematicians, adopted by Persian (Al-Khwarizmi's circa 825 book On the Calculation with Hindu Numerals) and Arabic mathematicians (Al-Kindi's circa 830 volumes On the Use of the Indian Numerals), and spread to the western world by the High Middle Ages."|
|The statements about the values Archimedes used for sqrt(3) seemed
to need verification. Here's what I found:
|If you download the PDF version of the Heath text, he has an extensive introduction which is interesting but the the text used here is from page numbers 93-98 of "Measurement of a Circle" and starts around PDF page number 281.|
|I entered many letter combinations describing lines, angles, and triangles as I transcribed and expanded on Archimedes' text. In the process I'm sure that there is more than one typo. If you work through the text and find any of these, please let me know.|
There is nothing particularly complex about the code, just a lot of fiddling with trig functions to draw the figures simulating Archimedes'. The results displayed in the string grid are based on the rational number approximations used by Archimedes, but for the graphics there was no reason not to use sine and cosine functions. For readability, the detail images posted above show only the first iteration moving from 6 to 12 sides but the original figures and my simulation has additional lines for a side of the 24, 48 and 96 side cases. This meant using little tricks like offsetting the letters labeling the lines representing shorter sides so they do not overlap. I spent more hours this week working on the mathematics and text than on the code, so I'll keep this short. Use the feedback links to inquire if you have questions about the code (or the math).
|By abandoning the graphics and the rational number approximations, it would be interesting to add a button to carry the iteration process further, say 100 iterations to see how accurate the estimates would be with 1030 sided polygons. J|
|Original: March 28, 2010||
Modified: March 29, 2010
Copyright © 2000-2014, Gary Darby
All rights reserved.