Approximate pi with polygons

Drag the slider to increase the number of sides of the inscribed and circumscribed polygons. The value of pi is calculated from the area of these polygons - bigger than the insdie one and smaller than the outside one. Note that as the number of sides increases, the polygons get closer and closer to the circle and we get a better and better approximation of pi.