Experiment
Epicycles.
Any closed shape is a sum of spinning circles. Add them a few at a time, watch the drawing sharpen, and listen to it.
Treble clef · Bravura, Steinberg
Shape
Circles
N = 1
Always the largest first. The rest are so small you'd barely notice them.
« L’étude approfondie de la nature est la source la plus féconde des découvertes mathématiques. » — Joseph Fourier
How it works
Put a pencil on the rim of a spinning circle, put another spinning circle on that one's rim, and so on. If each circle turns at its own whole-number speed and you pick the right sizes, the pencil can draw any closed shape. That's a Fourier series: z(t) = Σ cₖ eⁱᵏᵗ.
The tool walks the outline, takes 4,096 evenly spaced points and works out every circle at once with a fast Fourier transform. Then it draws with the N largest. A treble clef has four contours (the outside and three holes), so they're joined by bridges with no width: the pencil crosses over, goes round the hole and comes back the same way. A picture works the same way: it's split into dark and light, and every patch becomes another contour.
The error is the widest gap between what the circles draw and the real outline, as a share of its height. For the treble clef it falls from 36% with one circle to 0.25% with 256.
With the sound on, the tip's distance from the centre becomes a note: the farther out, the higher, rounded down to C major over two octaves. One circle never changes its distance, so it plays a single note. With more circles, the tip ends up playing almost the same tune the outline itself would.
The idea came from this post by matharium, which does it with a treble clef. The clefs come from Bravura, Steinberg's open music font.
More tools
All projects