top of page

Visualizing Pi (π) with n-gons

Simply put, for any circle, π or 'pi' is the ratio of the circle's circumference to its diameter. Sounds simple? Kind of is... kind of isn't.


There is no exact ratio, only the best approximate. Mathematicians across history starting from the Babylonians have crafted converging approximation methodologies and calculations to provide a value to π to higher and higher resolutions. (Brief history)


Pi is an irrational number, meaning the digits keep appearing after the decimal point till an infinite amount of places and never repeat in any pattern. This makes it quite an interesting progression to visualize! I did exactly this, used Processing to generate different visualizations for the irrational digit progression for π.


Digits after the decimal point as an n (n = digit) sided polygon.


In the above visualizations, adding any more rows and columns to this algorithm would render the individual shapes to go beyond recognition and would have little difference than them just being colored dots. So to push the number of digits that we want to showcase on one canvas, these shapes would have share their seat with their neighbors.


Consequent digits represented with overlapped n-gons after the decimal point where n = the current digit.


The visibility of the occurrence of each number in this visualization can be made easier with a simple animated loop which highlights each number from 0-9 in the whole spread.


Individual shapes highlighted in the shape stack made out of pi digits.

bottom of page