Fourier Epicycle Drawing Machine

Any doodle is a stack of spinning circles.

  • Draw your own shape
  • Pick the circle count
  • Spectrum shown
A small brass mechanism of stacked rings and two short arms standing on a white sheet of paper, above a fine line drawing of a single leaf

The guide

Any closed drawing is a sum of rotations, and its corners decide how many

Fourier's contested series turns a doodle into a list of circles. A smooth shape needs a handful, a corner needs dozens, and a jump is never quite caught.

  • 1807 Fourier's memoir on heat is read to the Paris Institute
  • 1.77% error left when a square is redrawn by its four largest circles
  • 13 circles bring the built-in heart within 1% of its outline
  • about 9% of a jump is overshot, however many circles are used
  • 1965 the fast transform becomes widely known
Read the full guide Fold the guide 7 min · 14 sources

Put a pencil on a sheet of paper, draw any loop that comes back to where it started, and keep going round it at the same pace for ever. The position of the pencil is now a periodic signal with two parts, left and right, up and down. Pack the two into one complex number and the old claim about periodic signals applies: the motion is a sum of steady rotations. A wheel carries a smaller wheel, which carries a smaller one, and a pen on the last of them retraces the loop.

The circles are the same drawing written in another language. How difficult a shape is turns out to be a property of that list: how many entries it has before they stop mattering, and how slowly they fade.

A claim that was not believed

Joseph Fourier came to the idea through heat. He began working on its theory around 1804, and by 1807 he had finished a memoir, On the Propagation of Heat in Solid Bodies, which was read to the Paris Institute on 21 December of that year. A committee of Lagrange, Laplace, Monge and Lacroix was appointed to report on it. The memoir is highly regarded today. At the time it caused a dispute.

In 1808 Lagrange and Laplace objected to exactly the part that carries his name now, the expansion of functions as trigonometrical series, and his further explanations did not persuade them. When the Institute made the propagation of heat the subject of its 1811 mathematics prize, Fourier entered the memoir with additions and won, but the report still held reservations about generality and rigour. The work appeared in print as the Analytical Theory of Heat in 1822.

The doubters had a point, and it is worth keeping. Fourier’s own arguments were informal by later standards, because precise notions of a function and of an integral did not yet exist. The series does not have to converge at all, and when it does it need not equal the function. Conditions under which it does were supplied later, by Dirichlet among others. The honest form of the claim is that any reasonable periodic curve is a sum of rotations, and that the word reasonable hides real work.

From a wave to a drawing

The complex form of the series makes the picture of circles exact. A periodic function is written as a sum of terms, each a fixed complex number multiplied by a factor that turns steadily, n whole turns in every period. One term is one point moving round one circle. The size of the coefficient is the radius, its angle is where the point starts, and the sign of n gives the direction: counter-clockwise for positive, clockwise for negative. The term with n equal to zero does not turn; it is the centre of the whole machine.

Each coefficient is an average of the function against a factor turning the opposite way. With a drawing nobody has a formula, only points, so the integral becomes a sum over N samples: the discrete Fourier transform. Conventions differ between books. All that is required is that the transform and its inverse carry opposite signs in the exponent and that their two scale factors multiply to one over N. A sign taken the wrong way does not give a slightly wrong picture. It runs the drawing backward.

One choice is easy to miss. The list describes a motion, and the same outline traced at an uneven speed has a different list. Sampling at equal steps along the line fixes that, and it is the fairest way to compare shapes.

Done term by term, the transform of N points costs about N squared operations; for 4,096 points that is about 30 million. A fast Fourier transform reaches the same numbers in a number of steps proportional to N times its logarithm. The idea became widely known through a paper of 1965, although Gauss had used a method very like it around 1805 to interpolate the orbits of the asteroids Pallas and Juno. Lengths that do not factor are handled by a device conceived in 1968 by Leo Bluestein, which rewrites the transform as a convolution.

What the circles cost

Parseval’s identity is the accountant of the method. With the scaling used here, the mean squared distance of the samples from the origin equals the sum of the squared radii of all the circles. Drop some circles and the identity applies to what is missing: the root mean square distance between the true samples and the shortened drawing is the square root of the sum of the squared radii that were dropped.

That settles which circles to keep. For a fixed number, the smallest error comes from keeping the largest, whatever their speeds. Cutting the series off at a frequency, which is the textbook partial sum, is a different rule, and it can be much worse.

A square shows the difference with numbers anyone can reproduce. Take the built-in square, two units on a side, with 512 samples. Its largest circle turns once a cycle and has radius 1.15. The next three are n = -3 with radius 0.127, n = 5 with 0.0459 and n = -7 with 0.0234; a square repeats itself four times in one turn, so only every fourth frequency is present. Those four circles leave an error of 1.77% of the size of the square. The four lowest frequencies leave 12.0%, because three of them have radius zero.

The radii in that list fall as the square of the frequency: 0.127 is close to one ninth of 1.15, and 0.0459 to one twenty-fifth. This is a general law. If a periodic function has m derivatives, the last of them allowed to be continuous only in pieces, its coefficients shrink faster than the m-th power of one over n. A curve with no corners is drawn well by a few circles. A corner, as the square shows, holds the fading to the inverse square, and every corner in an outline is paid for in the tail.

The built-in heart has a point at the bottom and a notch at the top. With 512 samples, 12 of its circles leave 1.12%, 13 circles bring it under 1%, and it takes 58 to reach a tenth of a percent. The last tenth is where the corners live.

A hand-drawn loop behaves the same way. The tremor of the hand is fine detail, so it sits in the fast circles, and smoothing the line before the transform is the same act as dimming them.

The jump that never heals

Corners are mild. A jump is not. When a periodic function steps suddenly from one value to another, the partial sums of its series overshoot on both sides of the step, and adding terms does not cure it. The peaks squeeze closer to the jump while their height settles at about 9% of it; the limit is 0.0894898 times the jump. Exactly at the step the series lands on the midpoint.

The effect is named after Willard Gibbs, who is remembered for it, though he was not the first. Henry Wilbraham analysed it in a paper of 1848 that drew little attention until 1914. Gibbs published a note in 1898, missed the overshoot in it, and described it in a correction in 1899. Maxime Bôcher gave the detailed analysis in 1906 and the name.

A closed outline has no jump, because the pen arrives where it left. So a square is the wrong shape for seeing this, and its ripples near the corners die away as circles are added. To see the real thing the pen must teleport. Run it round half a circle at a steady pace and then send it straight back to the start: with 512 samples and the 24 lowest frequencies, the redrawn path shoots past both ends of the jump by 8.6% of it, with an error of 16.5%. At 50 circles the error has fallen to 11.5% and the overshoot is 8.9%.

There are limits a reader should know. N samples give N circles and no more, so nothing finer than the sampling can be shown, and between samples the curve is an interpolation. When the number of circles approaches half the number of samples the measured overshoot drifts from the textbook figure; 200 circles of 512 samples give 9.6%. The method needs a loop, so an open stroke is closed by a straight line. And the list is not a fingerprint of a shape alone, since it depends on where the tracing starts and how fast it goes.

Epicycles, fairly judged

Astronomers stacked circles two thousand years before Fourier. An epicycle is a circle moving on another circle, used to model the changing speed and direction of the Moon, the Sun and the planets across the sky. The idea is often credited to Apollonius of Perga, although the theory of epicycles certainly predates him. Hipparchus built a model of the Moon’s motion on epicycles and showed that it did not agree totally with observation. Ptolemy, in the second century AD, set a planet on an epicycle whose centre moved round a circle offset from the Earth.

The fair reading of that astronomy comes from the mathematics above. Fourier analysis later showed that any smooth curve can be approximated as closely as one likes with enough epicycles. That is why the scheme predicted so well for so long, and also why predicting well proved nothing about what moves the planets. The popular story that astronomers kept piling circle on circle until the system collapsed is now regarded as mistaken: sixteenth-century books based on Ptolemy and on Copernicus use about equal numbers of them. What ended epicycles was Kepler’s ellipses, published in 1609 and 1619.

A drawing machine is an epicycle model that makes no claim beyond reproduction, which is its virtue. The list of radii is the thing to read. A short list means a smooth shape, a long slow tail means corners, and a tail that fades only as one over n means that somewhere the pen jumped.

Sources

Every source consulted for this guide. Links checked October 10, 2026.

  1. Joseph Fourier (1768 - 1830) - Biography - MacTutor History of Mathematics J. J. O'Connor and E. F. Robertson, University of St Andrews
  2. Fourier series - Wikipedia Wikipedia
  3. DLMF: §1.8 Fourier Series ‣ Topics of Discussion ‣ Chapter 1 Algebraic and Analytic Methods National Institute of Standards and Technology
  4. Discrete Fourier transform - Wikipedia Wikipedia
  5. Parseval's theorem - Wikipedia Wikipedia
  6. Fast Fourier transform - Wikipedia Wikipedia
  7. Chirp Z-transform - Wikipedia Wikipedia
  8. Gibbs phenomenon - Wikipedia Wikipedia
  9. A243268 - OEIS The On-Line Encyclopedia of Integer Sequences
  10. J Willard Gibbs (1839 - 1903) - Biography - MacTutor History of Mathematics J. J. O'Connor and E. F. Robertson, University of St Andrews
  11. Deferent and epicycle - Wikipedia Wikipedia
  12. Apollonius (262 BC - 190 BC) - Biography - MacTutor History of Mathematics J. J. O'Connor and E. F. Robertson, University of St Andrews
  13. Hipparchus (190 BC - 120 BC) - Biography - MacTutor History of Mathematics J. J. O'Connor and E. F. Robertson, University of St Andrews
  14. Ptolemy (85 - 165) - Biography - MacTutor History of Mathematics J. J. O'Connor and E. F. Robertson, University of St Andrews