Estimating π using polygons

Using Julia to play around with shapes and pies

Bence Komarniczky
Towards Data Science
5 min readMar 15, 2022

--

I thought a lot about what to post on π day (March 14th). I’ve already written an article about estimating π with Monte-carlo methods here, so I couldn’t do that again. Then I remembered that back in high school we were shown a different way of estimating π: by using n-sided regular polygons. So I got my Pluto notebooks out and grabbed Plots.jl to cook something up for this article.

--

--

Data scientist building ML products in ad-tech. I write tutorials on data science🧑‍🔬, machine learning 🤖, Julia and cloud computing ☁️.