Fourier Epicycle Drawer
Draw any shape and watch a chain of rotating circles (epicycles) retrace it using the Discrete Fourier Transform — a hands-on, fully local visualization of how Fourier series approximate curves.
How to Use
- Draw a continuous shape on the canvas by pressing and dragging with your mouse or finger — a closed loop works best.
- Release to run the Discrete Fourier Transform; a chain of rotating circles immediately starts retracing your drawing.
- Drag the "Circles" slider to use more or fewer epicycles — fewer circles give a rougher, smoother-cornered approximation.
- Adjust "Speed" to slow the animation down and watch each circle turn, or speed it up to see the full trace appear quickly.
- Try the Star, Heart, and Square presets, or hit Clear and draw your own; everything runs in your browser.
Press and drag on the canvas to draw a shape, then release — a chain of rotating circles will retrace it. Use the Circles slider to drop high frequencies and smooth the result.
From a drawing to a sum of circles
When you draw on the canvas, the tool collects a list of points along your path. Treating each point as a complex number — its x-coordinate as the real part and its y-coordinate as the imaginary part — turns your drawing into a complex-valued signal. The Discrete Fourier Transform (DFT) then breaks that signal into a sum of pure rotations.
Each rotation is a single term of a Fourier series. It has three numbers: an amplitude (how big the circle is), a frequency (how fast it spins, as an integer number of turns per loop), and a phase (the angle it starts at). Chaining the circles tip-to-tip — the center of each riding on the rim of the one before it — makes the final pen tip trace your original shape. These nested rotating circles are called epicycles.
Because the circles are sorted from largest to smallest, the first few capture the broad outline while the rest fill in detail and sharp corners. Dragging the Circles slider down keeps only the largest circles, which is a low-pass approximation: the shape stays recognizable but corners round off and fine wiggles disappear — exactly what happens when you truncate a Fourier series. Everything here is computed in your browser; nothing is uploaded.
Reference card
About the Fourier Epicycle Drawer
The Fourier Epicycle Drawer gives you a fast, free answer for everyday maths and number work without sending anything off your device. Draw any shape and watch a chain of rotating circles (epicycles) retrace it using the Discrete Fourier Transform — a hands-on, fully local visualization of how Fourier series approximate curves.
How it works
Type in what you have, and the answer shows up right away. Change anything and it updates by itself. Everything runs in your browser, so it is fast and nothing you type is sent away.
Want the deeper story? The Knowledge Base explains the ideas behind the tools in more detail.
Frequently Asked Questions
What are epicycles?
An epicycle is a circle whose center rides on the rim of another rotating circle. Stack many of them — each spinning at its own steady rate and size — and the tip of the last one can trace astonishingly complex curves. Astronomers once used epicycles to model planetary motion; here they are the geometric picture of a Fourier series, with each circle standing in for one frequency component of your drawing.
What's the connection to the DFT and Fourier?
Your drawing is a list of points, which we treat as complex numbers (x + i·y). The Discrete Fourier Transform (DFT) decomposes that list into a sum of pure rotations — each at an integer frequency, with its own amplitude (circle radius) and phase (starting angle). Every term in the Fourier sum is exactly one epicycle: amplitude sets the radius, frequency sets how fast it spins, and phase sets where it starts. Adding the circles tip-to-tip reconstructs the original path.
Why do fewer circles give a rougher shape?
We sort the circles by amplitude, so the first few carry the broad outline and the later, smaller ones add fine detail and sharp corners. Keeping only the largest circles is a low-pass approximation: you get the overall shape but corners get rounded and wiggles vanish. This is exactly how truncating a Fourier series works — drop the high-frequency terms and the reconstruction smooths out.
Can I draw any shape?
Yes — any freehand path you draw is sampled into points and transformed. Closed loops look best because the trace naturally repeats each period, but open curves work too. With enough circles, the DFT can reproduce your exact sampled points; with few circles you get a smooth, simplified version. Very jagged drawings just need more epicycles to capture all the detail.
Is this tool local and private?
Completely. Your drawing never leaves your device — the points, the DFT, and the animation are all computed in JavaScript right in your browser. Nothing is uploaded, stored, or sent to a server. Reload the page and your drawing is gone.
How do I use the Fourier Epicycle Drawer?
Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.
Does it cost anything or need an account?
No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.
Is anything I type uploaded?
No. The tool works entirely on your device, so the values you enter never leave your browser.
Common Use Cases
Understanding Fourier series
See abstractly summed sines and cosines turn into a concrete chain of spinning circles that draws a real shape.
Teaching the DFT
Show students how a list of samples decomposes into amplitude, frequency, and phase — and how those rebuild the signal.
Exploring approximation
Slide the circle count down to watch a complex curve degrade into a smooth low-frequency outline.
Math and signal-processing demos
A ready-made classroom or presentation visual for harmonic analysis, frequency content, and reconstruction.
Creative animation
Draw a signature, logo, or doodle and turn it into a mesmerizing looping epicycle animation.
Last updated: