2.4 The Archimedes Approach

The first technique we will consider, which is attributed to the mathematician Archimedes, makes use of a many-sided polygon to approximate the circumference of a circle. Recall that pi is related to the circumference of a circle, C, by the equation

Image

where r is the radius of the circle. Given a circle of radius 1, sometimes called a unit circle, this equation can be rearranged as simply

Image

The Archimedes approach, shown in FIGURE 2.2, uses the distance around a polygon that is inscribed within a unit circle. By using ...

Get Python Programming in Context, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.