
The colour columns
Hover, SVG
A minimal spirograph on warm white paper, a single orange ink and hairline strokes: the toothed wheel rolls inside the ring, the pen set in its hole draws the hypotrochoid, the curve closes with a small press and stays in grey under the next figure. The pointer moves the pen hole and the drawing recomputes live; a click swaps the wheel with a clean snap, the tooth counts written small at the bottom.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.
<!doctype html>
<!--
"Spirograph" from Animorio · https://animorio.com
License: free on your own sites and your clients’ sites, paid work included.
Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Spirograph</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/jetbrains-mono@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- A minimal spirograph: a wheel rolls inside a ring and the pen draws the curve; the pointer moves the pen hole,
a click (or a tap) changes the wheel -->
<main class="stage" data-stage>
<header class="head">
<p class="head__name">Spirograph</p>
<p class="head__hint" data-hint>Move to shift the pen, click to change the wheel</p>
</header>
<div class="paper" data-paper>
<svg class="spiro" data-svg viewBox="-125 -125 250 250" role="img" aria-label="A spirograph drawing a curve">
<g class="ticks" data-ticks></g>
<circle class="ring" data-ring cx="0" cy="0" r="100"></circle>
<g data-ghosts></g>
<path class="trace" data-trace d=""></path>
<g class="wheel" data-wheel>
<circle class="wheel__rim" data-rim cx="0" cy="0" r="40"></circle>
<line class="wheel__arm" data-arm x1="0" y1="0" x2="20" y2="0"></line>
<circle class="wheel__hub" cx="0" cy="0" r="1.1"></circle>
</g>
<circle class="pen" data-pen cx="0" cy="0" r="2.2"></circle>
</svg>
</div>
<footer class="foot">
<p class="ratio" aria-live="polite">
<span class="ratio__mask"><span class="ratio__val" data-ratio>96 / 36</span></span>
<span class="ratio__label">teeth</span>
</p>
<p class="hole">
<span class="hole__label">pen</span>
<span class="hole__val" data-hole>0.62</span>
</p>
</footer>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="script.js"></script>
</body>
</html>Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.
19 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:
Take “Spirograph” from Animorio and fit it into my siteThe wheel centre turns at a distance R − r from the middle, angle t; the wheel spins on itself by −(R − r)/r · t, and the pen sits d · r from its centre. The figure closes after 2π · r / gcd(R, r): that is why the tooth counts are whole numbers.
A state object carries the progress from 0 to 1 with GSAP (sine.inOut); every frame the SVG path is rebuilt from the points up to the angle reached, every 0.018 radians. So if the pen hole changes, the whole line already drawn is recomputed.
The wheel group moves and turns with a transform computed by hand; the dashed radius runs from the centre to the pen, and the pen dot sits at its tip. Changing wheel only animates the radius shown, with back.out(1.6).
Once the figure closes the pen swells and returns with elastic.out and the line goes from 1.5 times to normal width. Then a copy of the path goes into the group of grey figures, which keeps at most GHOSTS, and the tooth counts roll inside their mask.
The pointer’s distance from the ring centre, divided by the ring radius on screen, becomes the pen hole from 0.1 to 0.95; the value chases it by a factor of 0.14 per frame. On phones it works by dragging a finger.
| Name | File | Default | What it changes |
|---|---|---|---|
RING_TEETH | script.js | 96 | The teeth of the outer ring in the first figure. |
WHEEL_TEETH | script.js | 36 | The teeth of the rolling wheel in the first figure. |
PEN_HOLE | script.js | 0.62 | Where the pen sits in the wheel, from 0.1 to 0.95. |
DRAW | script.js | 5.6 | Seconds to draw a whole figure. |
HOLD | script.js | 1.4 | Seconds of finished figure before the next one. |
STROKE | script.js | 0.55 | The width of the pen line. |
INK | script.js | #e0502a | The pen colour. |
GHOSTS | script.js | 2 | How many old figures stay in grey. |
For the landing page of a generative art tool or a geometry course, as the background of a portfolio for someone who draws or codes shapes, or for a toy or stationery page: a drawing that makes itself in front of the viewer and answers the pointer.
The drawing is sized at min(78vmin, 100%), so it fits the box both in width and height; the type uses clamp. On phones the pen hole moves by dragging a finger, and a tap changes the wheel.
No rolling wheel and no growing line: the figure appears already finished with a fade; a click changes figure with a fade and the pointer moves the pen hole redrawing at once, with no motion on its own.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.0 KB; the libraries: GSAP 28 KB.
Tested on 2 December 2026
Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.