Fourier Polygons

So it turns out that the Fourier transforms of polygons look really cool, see below.

Polygons Polygon FFTs
Grid of polygons Grid of Fourier transforms of polygons

I generated the above images by using PIL’s ImageDraw.draw().polygon() function to create a 2D array of a polygon image, and computing the FFT of the array using NumPy’s FFT library. You can find the script I used to generate this on my GitHub

I like trippy videos, so I created an animation of the FFTs of polygons as the number of points continuously increases.

Tristan Lee

My name is Tristan Lee, I'm a data science with a background in computational physics. This is my blog that I use to share simulations, visualizations, and analyses. My focus areas include right-wing extremism, social network analysis, and high-performance computing.