Fourier Epicycles

Turn any closed shape into a chain of rotating circles: draw it on the pad, type its points, or pick one of our outlines (heart, star, square, house, gear and more). The tool samples the path at equal steps along its length, computes its discrete Fourier transform, and lines the circles up from the largest to the smallest; each circle turns a whole number of times per loop, and the pen at the end of the chain traces the shape. Choose how many circles to use and see how close the trace gets, with the error worked out for you, then press Play to watch the circles turn. Print a poster of the trace with its circles and arms, or download an SVG, a 300 DPI PNG or the terms as CSV. Nothing is uploaded.

100% private — everything runs in your browser. Everything runs in your browser; nothing is uploaded.

100% private — runs in your browser

Print at 100% (Actual size). Real size prints on one sheet when the drawing fits; the check bar in the footer lets you confirm the scale. The SVG holds the drawing at the printed size. Play animates the circles turning on screen. The CSV lists every term used (frequency, radius, phase).

Shape

Draw one closed shape on the pad (press, drag, let go); the path closes itself. Or type points as x,y pairs.

Fourier terms

Look

Page

Runs in your browser with our own code: nothing you draw or type is uploaded or saved. The shape is resampled, transformed with our own discrete Fourier transform, and the trace, circles and error are computed from those terms. You may use what you make here, including commercially, with no credit needed.

How to draw a shape with Fourier epicycles

  1. Pick a preset or an outline, or choose Your own points and draw a closed shape on the pad.
  2. Set the number of points sampled and the number of circles (terms) to use.
  3. Choose whether to show the circles, the arms and the sampled shape, and the time the chain is shown at.
  4. Press Play to watch the circles trace the shape, then choose Fitted to one page or Real size.
  5. Download the PDF poster and print at 100% (Actual size), or the SVG, PNG or CSV.

What you can use it for

  • Lessons on Fourier series and the DFT
  • Seeing how many circles a shape needs
  • Posters of a drawing traced by circles
  • Plotter and laser line art from the SVG
  • Checking an outline’s Fourier terms from the CSV
  • Animated demonstrations on a classroom screen

The 17 presets

PresetPoints sampledCircles usedRMS error (of the width)Largest error (of the width)
Heart, 20 terms256200.43%2.41%
Heart, only 5 terms25653.77%9.92%
Circle: one circle is enough25610%0%
Ellipse: two circles25622.7%3.93%
Square, 4 terms25640.9%3.1%
Square, 50 terms256500.03%0.11%
Triangle, 12 terms256120.24%1.46%
Five-point star, 30 terms256300.05%0.43%
Figure eight, 6 terms25661.97%3.02%
Three-petal rose, 10 terms256100.12%0.33%
Five-petal flower, 5 terms25650.58%1.25%
House outline, 40 terms256400.22%0.96%
Arrow, 25 terms256250.37%1.34%
Gear, 20 terms (512 points)512200.04%0.09%
Drop, 8 terms, trace only25682.25%7.8%
Your own points (typed or drawn)256150.59%2.58%
Real size: heart trace 150 mm wide256300.24%1.53%

Errors are worked out by the tool from the terms it draws.

Error as circles are added: heart and square (256 points)

CirclesHeart RMS errorHeart largest errorSquare RMS errorSquare largest error
110.10228.4796.9513.392
28.33822.7762.7757.021
36.56117.631.564.725
53.86410.1540.7442.842
101.2375.1340.2761.403
200.4462.4770.1110.658
500.1180.8940.0340.126
1000.0470.31100
2550000

Errors in shape units: the heart is 102.4 units wide and the square 100. With 255 circles (all of them) both errors are zero to rounding.

The ten largest circles of the heart

OrderTurns per loop kRadiusStarting angle
1-142.11190°
225.703−90°
3-35.145−90°
4-24.033−90°
5-43.443−90°
612.564−90°
741.907−90°
831.25290°
960.912−90°
10-60.888−90°

Negative k turns clockwise. The centre X_0 is not a circle.

What prints

DownloadWhat is in it
PDFA poster of the trace with the circles, arms and sampled shape at the time you choose, fitted to one page or at real size, with the error and a check bar
PNG 300 DPIThe same sheet as a picture
SVGThe poster at the printed size: trace, sampled shape and arms as paths, circles as circles
CSVEvery term used: k, radius, angle, real and imaginary parts

For a cutter that needs DXF, use SVG to DXF.

Which tool to use

You wantUse
Any closed shape traced by circles worked out from itFourier Epicycles (this page)
One circle rolling round anotherSpirograph Generator, Epicycloid, Hypocycloid
Curves from two or more swinging pendulumsHarmonograph, Lissajous Curve
Drawings from typed turtle commandsTurtle Graphics

Other tools: the Spirograph Generator draws rolling-circle art, the Fractal Generator renders fractals and Graph Paper prints grids for sketching a shape by hand.

More free tools

Maths art, curves and printables?

Drawing and print tools that run privately in your browser, with no sign-up and no watermark.

See all free tools →

Frequently asked questions

What are Fourier epicycles?

Circles riding on circles: each circle turns at its own whole-number speed, and the point at the end of the chain draws a curve. Any closed path can be written as a sum of such turning circles, a Fourier series; the Wikipedia article on the deferent and epicycle (read 13 November 2026) notes that epicycles can be represented as a complex Fourier series.

How does the tool find the circles?

It walks round your path and takes N points at equal steps along its length, writes each point as a complex number x + iy, and computes the discrete Fourier transform X_k = (1/N) Σ z_n e^(−2πikn/N). Each X_k is one circle: its size |X_k| is the radius, its angle is the starting position and k is how many times it turns per loop (negative k turns the other way). X_0 is the centre.

Does it really reproduce the shape?

With all N − 1 circles, the chain passes exactly through the N sampled points: our tests rebuild every preset’s points from the terms to 0.000000001. With fewer circles it is an approximation, and the tool reports how far off it is.

How many circles do I need?

Smooth shapes need few, sharp corners need many. A circle needs exactly one (our tests check that every other term is zero), an ellipse two. The table below shows the error of a heart and a square as the number of circles grows: the error never grows when you add a circle, and the square, with its four corners, needs far more circles than the heart for the same error.

Which circles are used first?

The largest ones. The terms are sorted by radius, so with K circles the tool uses the K largest, which gives the smallest error for that many circles.

How is the error worked out?

As the root-mean-square distance between the trace and the sampled points, over all N points, shown as a share of the trace’s width, with the largest single distance too. It equals the square root of the sum of |X_k|² over the unused terms (Parseval’s theorem), which our tests check.

Can I draw my own shape?

Yes: choose Your own points, then press, drag and let go on the pad; the path closes itself. You can also type up to 4,000 points as x,y pairs. The shape is then resampled to the number of points you set (16 to 1,024).

Is this the same as a spirograph or an epicycloid?

No. Those curves come from one circle rolling round another, with fixed sizes. Here the circles are worked out from your shape, and there can be hundreds of them.

Does the animation keep running?

No. Play runs the circles for the number of loops you set (1 to 5) and stops; it also stops when you press Stop, change a setting or switch to another tab.

What is in the CSV?

Every term used, largest first: its frequency k, radius, starting angle and the real and imaginary parts of X_k.

Can it print at real size?

Yes, when the drawing fits on one sheet: choose Real size and set the size. Every printed point is within 0.2 mm of its true place in our tests, on US Letter and A4, as long as you print at 100% (Actual size); the check bar in the footer lets you confirm the scale. Bigger drawings print fitted to the page.

Is it free?

Yes. There is no sign-up, no watermark and no limit.

Is anything uploaded?

No. Your drawing and every term are worked out by JavaScript in your browser. Nothing is sent anywhere or saved when you close the page.