Every shape is a sum of circles.

Circles on circles can trace a trefoil, a coastline or your own scribble, and the Fourier transform finds them. What a fit by circles does not show is that anything moves on circles.

  • Mathematics
  • 8 min read
  • 1 simulation

Can a drawing be made of nothing but spinning circles?

Draw a loop on a napkin and it is just a loop. It is hard to see what else it could be made of.

The figure beside the text shows it can be made of circles. As you scroll it builds one up a circle at a time, and you can take hold of it. Draw your own closed curve in the frame, lift your pen, and the circles take it over.

A point on a circle

Start with the simplest motion there is. A point goes round a circle at a steady pace. That is all it does, and all it can draw, a circle.

Before you scroll, take a guess. How many circles would it take to draw a loop that crosses itself three times?

Draw any closed curve in the frame, then lift.

Figure. One circle with a dot going round its edge at a steady pace. A drawing frame marks the plane. If you draw a closed curve in it, the circles take it over and one circle of your curve turns here.

Two

Hang a second circle from the dot. It has half the radius and turns the other way, at half the speed. The dot on its rim draws the trefoil.

That dot is where two turning arrows add up. Give the second circle any whole number for its speed and the loop changes, but it still closes, because both circles are back where they started after one lap.

Set the speed of the second circle. Any whole number closes the loop.

Figure. A second, smaller circle turns on the edge of the first. The dot on its rim draws a trefoil, a loop that crosses itself three times. A slider sets the speed of the second circle from minus four to four turns per lap.

A chain whose end draws

Hang another circle from the second, and another. The dot now rides at the end of a chain. Six circles, each smaller than the last, draw a looped stroke that looks like joined-up handwriting.

Every circle needs three numbers: a radius, a speed and a starting angle. Nobody guessed them. They were calculated, and the next step shows how.

Change how many circles the chain has.

Figure. Six circles in a chain, each hung from the edge of the one before and each smaller than the last. The dot at the end draws a rough looped stroke like cursive handwriting. A slider sets how many circles the chain has, from 1 to 12.

Where the circles come from

A thin outline of the same loop appears, and under it a bar for each of the biggest circles, biggest first. The discrete Fourier transform found them. It takes NN points spaced equally along the outline, each a complex number zn=xn+i ynz_n = x_n + i\,y_n. Then for each whole number kk it asks how much of the outline turns kk times per lap.

ck=1N∑n=0N−1zn e−2πi kn/N,z(t)=∑kck e2πi ktc_k = \frac{1}{N}\sum_{n=0}^{N-1} z_n\, e^{-2\pi i\,kn/N}, \qquad z(t) = \sum_k c_k\, e^{2\pi i\,kt}

Each ckc_k is one circle. Its radius is ∣ck∣|c_k|, its starting angle is the angle of ckc_k, and it turns kk times per lap. The circle with k=0k = 0 does not turn. It is the centre the chain hangs from.

Now draw your own, and the circles are found the same way.

Pick a shape, or draw your own. The circles appear when you lift.

Figure. A thin outline of a looped stroke, and the chain of six circles tracing it. Under it, a bar chart of the circles found, tallest first, each labelled with its speed. The first bars are far taller than the rest. Controls pick another shape or set how many circles the chain has.

More circles, closer

How many circles is enough? That is up to you now. Drag the slider up and the outline sharpens. The chain adds its biggest circles first, so each new one removes as much error as any other circle could. Error here is the average distance from the outline, as a share of the shape’s size.

For the loop, 6 circles leave about 11%, 12 leave under 5%, and 27 leave under 1%. Corners are harder. The ridge needs 15 circles for 5% and 48 for 1%.

The stage stops at 128 circles, or 64 on a phone. With all 511 the pen would pass through each of the 512 points exactly. A list of NN points is NN circles.

Drag the circles slider, or tap the chart.

Figure. The outline and the path of the chain with a few circles. Under it, an error chart on log scales: the average error falls steadily as circles are added, the worst point falls more unevenly, and a marker sits at the current number of circles. Readouts give the error and the circle counts that reach 5% and 1%.

A note is a sum of sine waves

It works for sound too. Turn the circles on their side and keep only the pen’s height. One circle gives a sine wave, the shape of a pure tone. Add circles a third, a fifth and a seventh of the size, turning 3, 5 and 7 times as fast, and the wave squares up.

square(t)=4π(sin⁡2πt+sin⁡6πt3+sin⁡10πt5+⋯ )\text{square}(t) = \frac{4}{\pi}\left(\sin 2\pi t + \frac{\sin 6\pi t}{3} + \frac{\sin 10\pi t}{5} + \cdots\right)

Each term is one circle of radius 4/(πn)4/(\pi n) turning nn times per lap. The bars underneath are the spectrum, how much of each pitch the sound holds. It is the same transform, in one dimension. Joseph Fourier used sums like this to describe how heat spreads, in a memoir of 1807 and a book of 1822.

Look at the jump. The sum overshoots it, and adding more sine waves does not shrink the overshoot. It stays near 9% of the jump and only gets narrower. Henry Wilbraham described it in 1848, and Josiah Willard Gibbs again in 1899.

Add sine waves and watch the overshoot beside each jump.

Figure. A circle on the left with a dot whose height is traced to the right as a wave. With one sine wave the trace is a sine. With more it becomes a square wave, with a small peak beside each jump that stays near the same height. Bars below show how large each sine wave is. Controls pick the wave and set how many sine waves are added.

What it does not say

Two circles trace the orbit of Mars to within half a percent of its size. Swap in a shape, or your own scribble, and it needs more circles, but it gets there.

So does Mars really move on circles? It looks that way, but it does not follow. Circles can draw almost any closed path, so a good fit by circles says nothing about whether anything moves on circles. Ptolemy, in the second century, predicted the planets with circles on circles, and was trusted for over a thousand years. In 1960 the philosopher Norwood Russell Hanson pointed out that chains of circles can match any reasonable periodic path as closely as you like.

A fit that cannot fail can describe a path. It cannot tell you why the path goes that way. Kepler later replaced the circles with ellipses, and Newton explained those with gravity, one law for every orbit instead of a fresh set of circles for each. Why a model that can fit anything proves little is the subject of Simpler explanations win.

One more limit, on the word “any”. What is exact here is a list of points, and NN points are exactly NN circles. A curve with infinitely fine detail can defeat the sum at some points, so this note only promises what you can draw.

Swap Mars for a shape, or your own, and give it circles.

Figure. The orbit of Mars as an almost circular oval with the Sun a little off centre, traced by a chain of two circles that match it to within half a percent. Controls swap the path for another shape or your own drawing and set how many circles trace it. Readouts give the error.

Sources

  1. Joseph Fourier, Théorie analytique de la chaleur (Firmin Didot, 1822), and the memoir on heat he presented to the Institut de France in 1807.
  2. Henry Wilbraham, “On a certain periodic function”, The Cambridge and Dublin Mathematical Journal 3 (1848), 198 to 201.
  3. J. Willard Gibbs, “Fourier’s Series”, Nature 59 (1899), 606. For the history and the limit, 0.0895 of the jump, see Gibbs phenomenon.
  4. Norwood Russell Hanson, “The Mathematical Power of Epicyclical Astronomy”, Isis 51 (1960), 150 to 158.
  5. Deferent and epicycle, on Ptolemy’s Almagest and how long his methods lasted.
  6. Jürgen Mayer, Khaled Khairy and Jonathon Howard, “Drawing an elephant with four complex parameters”, American Journal of Physics 78 (2010), 648 to 649. Freeman Dyson, “A meeting with Enrico Fermi”, Nature 427 (2004), 297.
  7. NASA, Mars Fact Sheet, for the eccentricity of Mars, 0.0934.
  8. The transform follows the convention of NumPy’s FFT. Terence Tao’s notes on almost everywhere convergence of Fourier series cover why a Fourier series does not always converge.