Make spirograph patterns online. Adjust frequency ratio, radii, arms, trail length and harmonograph damping, watch it draw live, and export a PNG or video. Free, no signup, runs in your browser.
Knobs patch the running animation live. A few (marked in the code as baked-in values like particle counts) restart the preview.
Two stacked radii per arm, plus a fading trail. Change ratio.
Your code runs in a sandboxed frame with no access to this page, and it is never sent to a server. three.js demos load the library from jsDelivr; the rest need nothing but the browser.
A spirograph traces the path of a point on one rotating circle as it rolls around another. Written directly, that is two rotations added together:
x = R₁·cos(t) + R₂·cos(ratio·t)
y = R₁·sin(t) + R₂·sin(ratio·t)
Everything about the figure comes from those four numbers. This generator draws them live so you can see each one take effect.
They are often confused. A spirograph is geometric: circles rolling on circles, and the figure repeats forever without changing. A harmonograph is physical: pendulums swinging at different frequencies, drawing until friction stops them. The damping control here is exactly that friction, which is why turning it up converts one into the other.
Set canvas fade to 0 so nothing decays, raise trail points to its maximum, and let it draw until the figure closes. Then Save PNG. For an animated version, use Record instead — a slow speed with a fractional ratio makes a good loop.
Everything runs in your browser and nothing is uploaded.
A spirograph figure is the sum of two rotations, one attached to the tip of the other:
x = R1 cos(t) + R2 cos(k t)
y = R1 sin(t) + R2 sin(k t)
where k is the frequency ratio. This family of curves has proper names: when the small circle rolls around the outside of the fixed one the result is an epitrochoid, and when it rolls around the inside it is a hypotrochoid. The plastic toy produces hypotrochoids, which is why negative ratios here look most like the toy.
This is the question the ratio really answers. Write k as a fraction in lowest terms, p/q. The curve closes after exactly q full turns of the outer arm. Some consequences:
k = -3 is -3/1, so it closes after one turn. Instantly symmetric.k = 2.5 is 5/2, so it needs two turns to close.k = 3.25 is 13/4: four turns, and a much denser figure.Denominators are why small slider changes produce wildly different figures: 2.50 and 2.51 are 5/2 and 251/100, and one closes in two turns while the other takes a hundred.
Adding rotating arms of different frequencies is precisely what a Fourier series does. Two arms give these curves; add more, with the right radii and frequencies, and you can trace any closed curve — which is the basis of the "drawing with epicycles" animations. This tool is a two-term Fourier series that you can steer by hand.
A harmonograph is a Victorian drawing machine: two or three pendulums swinging at slightly different frequencies, connected to a pen and a moving table. It was used to visualise musical intervals — pendulums tuned to a 3:2 frequency ratio (a perfect fifth) trace a stable, simple figure, while dissonant ratios produce tangled ones.
The crucial physical difference from a geometric spirograph is that pendulums lose energy. Amplitude decays exponentially:
decay = exp(-t * damping)
so the radii shrink as the drawing proceeds and the closed figure spirals inward, never retracing itself exactly. That is the damping control here. At zero you have pure geometry; above zero you have physics.
The trail controls decide whether you are producing an animation or a print:
p/q ratio needs q turns.For a looping animation instead, keep a small fade, choose a fractional ratio so the pattern keeps evolving, and use Record to capture WebM.
Each arm is drawn on its own hue, spaced across the range set by the hue spread control, and each trail ramps in width and brightness from tail to head. That head-to-tail gradient is what makes the line read as motion rather than as a static wireframe.
It is the speed of the second rotating arm relative to the first, and it decides the identity of the figure. Whole numbers close the curve into a clean rosette - a ratio of -3 gives three lobes, -5 gives five. Negative values counter-rotate the inner arm, which produces the classic toy-spirograph look. Fractional values like 2.5 take far longer to close and weave much denser patterns. Every other control changes proportions; this one changes the shape.
A spirograph is geometric: circles rolling on circles, tracing a figure that repeats forever unchanged. A harmonograph is a physical machine - pendulums swinging at different frequencies with a pen attached - and pendulums lose energy to friction, so the figure spirals inward as it draws. The damping control here is exactly that friction. At zero you have a spirograph; above zero you have a harmonograph.
Set Canvas fade to 0 so nothing decays, raise Trail points to maximum, and let the figure draw until it closes on itself. Then use Save PNG. For an animated version use Record instead, which produces a WebM video - a slow speed with a fractional ratio makes a good loop.
Yes. The output is a mathematical curve, not a copyrighted asset, and the source code shown in the editor is free to reuse. Nothing you make here is uploaded or stored.
Edit and run 20 canvas, WebGL, three.js and CSS animations live in your browser.
Explore the Mandelbrot set in your browser - zoom, pan, tune iterations, switch to Julia sets, and save a PNG.
Generate the Matrix digital rain effect in your browser. Tune speed, glyphs, colour and trail length, then export a PNG, video or standalone HTML file.