Draw any shape with rotating circles - the magic of complex Fourier series
One of the most beautiful applications of Fourier analysis is the ability to recreate any closed curve using nothing but rotating circles. Each circle (or epicycle) rotates at a different frequency, and when you trace the tip of the final circle, the path draws your shape.
This works because the complex Fourier series decomposes your drawing into circular motion: each term c_n e^(inωt) represents a circle rotating at frequency n with radius |c_n|.
Draw any shape on the canvas below and watch as rotating circles recreate your drawing. Try different numbers of circles to see how more circles give better approximations.
Draw on the canvas to create your own shape, or choose a preset. Watch as rotating circles (epicycles) recreate your drawing through the magic of Fourier series!
Given a closed path f(t) where t goes from 0 to 1, we compute the complex Fourier coefficients:
Each coefficient c_n tells us about a circle rotating at frequency n:
The key insight is that circular motion is the most fundamental form of periodic motion. Any periodic function can be built from circular motions at different frequencies:
Captures the general shape but misses fine details. Like a blurry photo.
Captures sharp corners and fine details. More circles = higher resolution.
The word "epicycle" comes from ancient astronomy. Greek astronomers like Ptolemy used epicycles (circles upon circles) to model planetary motion. While their geocentric model was wrong, the mathematics they developed is essentially the same as the complex Fourier series - any periodic motion can be decomposed into circular components!