All motions

Oscilloscope intro

One electron beam draws everything: Lissajous figures, a wireframe, a monogram

Created with AI
  1. 0–7.6 s Dot, line, sine wave — then X-Y mode, the Lissajous figure locks at 1:1, 3:2 and 5:4
  2. 7.6–11.5 s The figure wraps onto four great circles, the arcs straighten into a rotating wireframe solid
  3. 11.5–14.2 s The solid is pulled out like thread, the beam writes P, the knot and M in one stroke
  4. 14.2–18.2 s Below it the beam writes “AUTOMATION & AI” in a stroke font, retraces stay faintly visible
  5. 18.2–20 s The picture collapses into a line, then into the dot — the loop starts over
  • Oscilloscope
  • 20 s Loop
  • 1080² · 30 fps
  • Canvas 2D
  • 1.4 MB

Prompt

English · for Claude Code, Codex & co. · 821 words
Build a 20-second looping intro, 1080×1080, drawn entirely by one electron beam on an analogue X-Y oscilloscope. Nothing on the tube is a filled shape or a font: every frame is the path of a single beam. The only name on screen is the monogram "PM".

DESIGN
Device face #060807, a recessed tube (880×712, rounded corners) lit from the top left: shadow under the upper lip, a hairline of light on the lower right edge. Tube face near-black green with a 10×8 graticule (84 px per division, fifths on the centre axes), everything on the glass bent by a slight barrel curvature. Beam in P31 phosphor green rgb(88 255 156), 2.3 px, drawn additively so hot spots burn to white, with a light halo (the beam layer halved four times and laid back over itself). Outside the tube, in Geist Mono: printed legends CH1 X, RATIO X:Y, CH2 Y above and CH1 VOLTS/DIV, TIME/DIV, CH2 VOLTS/DIV below (15 px, grey), each with a 27 px value in dim green that switches in steps like a rotary switch (OFF / 1.00 kHz / VECTOR, GND / 2 V / 1 V, 0.2 ms / 0.1 ms / X–Y), plus a small LOCK lamp next to the ratio.

STORYBOARD
0–7.6 s  A resting dot stretches into a sweep line (0.7), CH2 gain comes up: a sine wave, two periods (1.5). The time base stretches it to one period (2.4), then X switches from sawtooth to sine and the wave curls into a circle: 1:1, LOCK (3.9). The ratio glides to 3:2 (lock 5.4) and 5:4 (lock 6.9); while it glides the figure does not close and tumbles as a mesh, then snaps shut. Locked figures lean slowly.
7.6–11.5 s  The 5:4 figure wraps, point for point, onto four great circles of a sphere that starts to turn; the arcs straighten one after another into the 24 edges of a cuboctahedron, drawn as one closed stroke with a short dwell at every vertex. The solid rotates, then shrinks and slides right.
11.5–14.2 s  The stroke of the solid is pulled out like thread and laid down in one go as P (from its foot, round the bowl, back into the stem), a knot between the letters (a tight spiral where the beam parks) and M, with faint retraces between them. A cursor dot waits where the text will start.
14.2–18.2 s  The monogram steps up; the beam writes AUTOMATION & AI below it in a stroke font built from line segments (octagonal O, pointed A, kerned capitals), pen tip glowing, retraces routed through the gap, never across letters. Hold 1.7 s.
18.2–20 s  Y gain to zero: the picture collapses into a burning line; X gain to zero: the dot. It flares, settles, and swells slightly before frame 0.

MOTION
Model the beam, not the picture. The display is refreshed 60 times a second; a frame shows the last eight passes weighted by an exponential decay of 45 ms and normalised, so anything that moves leaves a fading trail. Along a pass every segment carries the time the beam spent on it: brightness = time / length, capped. Slow stretches, turning points and vertex dwells glow; retraces run 12× faster and stay faint. The two glides add a whole number of cycles (integrate the frequency analytically), so a locked figure closes inside one pass. Every transition is a morph along the path parameter u: each point of one stroke moves to the point of the next stroke with the same u. Choose the start vertex, direction and orientation of the solid that minimise that travel. Where the picture moves fast, integrate the afterglow on a 240 Hz grid so trails smear instead of strobing. Signal noise: 0.3 px of seeded value noise per pass. Critically damped or smoothstep easing only; nothing overshoots.

TECHNIQUE
- One self-contained HTML page plus one JS file (no inline script, no libraries, no network requests). Stage exactly 1080×1080 CSS px, or the size named above (1080×1920 for portrait).
- Expose window.MOTION = { duration, fps: 30, width, height, seek(t) } with the stage size in width and height. seek(t) redraws the frame for time t from scratch: no state between frames, no Math.random (seeded PRNG only), no Date, no CSS transitions, no timers.
- Loop: seek(0) and seek(duration) must look identical.
- With ?render=1 the stage sits unscaled at the top left (for frame capture). Without it, scale the stage to fit the window and loop with requestAnimationFrame.
- prefers-reduced-motion: show one representative still, no loop.

CHECK
Render stills at the listed times, look at every one, fix anything that overlaps, is cut off, aliased or unreadable, then render again. Report only when frame 0 equals the last frame.
Stills: every second, plus every 0.1 s from 0.5 s before to 0.5 s after 7.6, 11.5, 14.2, 18.2 and across the loop seam; frame 0 must equal frame 20.

How to recreate it

  1. Give the prompt to a coding agent

    Create an empty folder and paste the prompt into Claude Code, Codex or Cursor. The agent writes one HTML page and one script — the animation then runs right in the browser.

  2. Let it check the stills

    The prompt makes the agent render stills and look at them itself. Only refine what you don't like in the picture: “scene 3 is too busy” works better than a new prompt.

  3. Render to MP4

    Because every animation can draw any frame exactly through window.MOTION.seek(t), a small script renders it frame by frame — no stutter, no screen recording. Then ffmpeg joins the frames into a clip.

Render commands Download render.mjs
# 1 · Render every frame (Chrome, Node ≥ 22)
node render.mjs http://localhost:3000/ \
  frames/ frames 30

# 2 · Join the frames into an MP4
ffmpeg -framerate 30 -i frames/%05d.png \
  -c:v libx264 -preset slow -crf 22 \
  -pix_fmt yuv420p -movflags +faststart \
  my-motion.mp4

How a clip is built with Claude Code

Background

An intro in the style of an analogue X-Y oscilloscope: one beam turns from a dot into a sine wave, locks as a Lissajous figure at 1:1, 3:2 and 5:4, folds into a rotating wireframe solid and writes the monogram PM and “Automation & AI” in one stroke. With phosphor afterglow, 20 seconds, with the prompt.

What I learned building it

The tube look does not come from a filter but from the model: I draw the path of the beam, not an outline, and compute brightness as dwell time over distance. Turning points, corners and afterglow then appear by themselves.

Inspiration

The starting point was a prompt by @rneayan ((opens in a new tab)) on Skillry. You'll find the original wording there; the prompt above is my own version.

More motions

Contact

Let's discuss
your project
together.

Send me a message or fill out the contact form. I'll get back to you within 24 hours.

Paul Mill

Paul Mill

hallo@paulmill.com