Starting with a square with a diagonal of 2 (inscribed in a unit circle), we split the edges times while keeping the shape a regular n-gon.
We obtain a polygon with sides. Its perimeter is .
This gives us an approximation of π = (vs JavaScript's built-in π = ).