Notes: This program calculates the value of pi. A regular polygon having 'n' number of sides is inscribed within a circle of known radius and another regular polygon with the same number of sides is circumscribed around thecircle. As the value of 'n' is increased, the average value of the perimeters of the two regular polygons approach the circumference of the circle. The average when divided by the diameter of the circle gives the approximate value of Pi.
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use