The request breaks out
Physics simulation: one ball, seven turning rings, one gap each
- 0–0.7 s the ball rattles around the innermost ring, INBOX, with the camera close in
- 0.7–7.7 s ring after ring, the ball finds the gap; each ring shatters and the counter rolls up
- 7.7–9.7 s the last ring, REPLY, takes its time, then it breaks too
- 9.7–12.4 s the ball becomes a kobalt disc with a check, ANSWERED rises, the clock stops at 1:57
- 12.4–15 s the rings rebuild from the inside out and the ball launches again
- Physics simulation
- 15 s Loop
- 1080² · 30 fps
- Canvas 2D
- 1.5 MB
Prompt
Build a 15-second looping "ball escapes the rings" simulation, 1080×1080 — the satisfying physics format, told as a story: a request breaks through every hurdle until it is answered.
WORLD
A white ball (radius 11, the request) bounces inside seven concentric rings around one centre (radii 74 → 398 in steps of 54). Each ring has one gap and a small mono label sitting at the top, outside the ring, that does NOT rotate: INBOX, SPAM CHECK, TRIAGE, CRM, CALENDAR, DRAFT, REPLY. The rings turn slowly, alternating direction, each a whole number of turns per loop (so every ring angle is periodic in t and the loop is seamless). Gap size is similar in arc length on every ring (half-angle ≈ 56 / R, clamped to 0.17–0.36 rad). Only the innermost intact ring is in play.
PHYSICS (real, deterministic, precomputed once)
Fixed step 1/480 s, gravity 1500 px/s², launch velocity (360, −680) from the centre. On contact with the ring wall: reflect the normal component, drag the tangential component 22 % toward the wall's own speed (ω·R, friction with a turning wall — this breaks periodic bounce patterns), then rescale to the incoming speed so no energy is lost. Timing is directed, not hoped for: for each ring, probe with a solid wall, list every contact, and pick the contact closest to a target time (about every 1.4 s, the last ring a little later for tension) whose earlier contacts all hit solid ring; then rotate that ring's phase so its gap sits exactly under that contact. Run again with the gap in place: the ball passes through, the ring breaks.
LOOK
Steel #0E1117 with a soft grey radial light behind the rings, a faint dot grid (40 px), a vignette to #08090C, dark scrims behind the HUD at top and bottom. Rings cream #F2EFE8 at ~55 %, 1.6 px, with rotating tick marks (every 7.5°, longer every 30°, skipped under the label) and short end caps at the gap. The ring in play turns kobalt #7B95EE, 3 px, its label too. Ball white with a 0.3 s tapered kobalt trail. Exactly one accent (kobalt); no coloured glow, no lens flares, no confetti.
BEATS
Every bounce: the ring flashes toward white and thickens for ~0.1 s, a bright arc highlights the contact point, and a thin kobalt ripple expands from it. Every escape: the ring splits into 8 + 2·i arc shards that fly outward with the ring's spin, an upward kick and gravity, tumbling and fading in ~1.2 s (white for the first frames, then kobalt); a thin shock ring runs outward; the label drifts out and fades; the next ring turns kobalt; the camera does a 2 % punch. The camera starts pushed in (1.34×) on the inner rings and widens by critically damped springs as rings fall, ending at 1×.
HUD
Top left: "RINGS CLEARED" (Geist Mono 13 px, tracked) over a huge two-digit counter (Geist 700, 138 px) with "/07"; each change rolls the digits through a mask, 07 turns kobalt. Top right: "REQUEST #2048" and a mono clock (46 px) that maps the run to 1:57. Bottom: an Instrument Serif caption "One request. Seven hurdles." and a mono bounce counter.
ENDING (loop)
After the last ring breaks, a spring pulls the ball to the centre while it grows into a deep-kobalt disc (#18318A) with a kobalt rim, a white check draws on, ANSWERED (Geist 700, 92 px) rises letter by letter out of a mask, "IN 1:57 · 7 OF 7 RINGS · 0 CLICKS" underneath, and the caption swaps to "Answered before anyone looked." At 12.4 s everything sinks back, the disc shrinks to the ball, the rings rebuild from the inside out (each drawn on from its gap edge, 0.16 s apart), the counter rolls down to 00, the camera pushes back in — and at 14.6 s the ball launches again: the same instant the loop starts from.
MOTION
Critically damped springs 1 − (1 + w·t)·e^(−w·t) everywhere, nothing overshoots. Motion blur by averaging 6 whole-frame samples across a half-frame shutter while the ball is in flight or shards are flying (wrap the sample times around the loop).
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: 0, 0.68, 0.8, 2.3, 4, 5.5, 7.65, 7.8, 9.64, 9.8, 10.6, 11.5, 12.6, 13.6, 14.999. How to recreate it
-
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.
-
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.
-
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.
# 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
Background
The ball-in-rotating-rings format as a small story: a request bounces through seven rings from Inbox to Reply, finds every gap, each ring shatters into shards, until the word Answered appears. Real, precomputed physics, 15 seconds, seamless loop, with the prompt to recreate it.
What I learned building it
Real physics gives you beautiful paths but no timing. So I run each ring without a gap first, then turn the gap to sit exactly under the bounce that lands on the beat. Everything stays physical and still cuts like an edit.
More motions
-
An agent platform, introduced UI motion 0:15 -
Agents that pick the model UI motion 0:14 -
A sentence becomes an app UI motion 0:15 -
An operating system, introduced UI motion 0:47.2 -
Your new design partner Voice-over 0:54.3 -
Ten kilometres, floating UGC ad 0:12.6 -
The journey of an order Explainer 0:34 -
Make it move Kinetic typography 0:08 -
From noise to a workflow Particles 0:14 -
The Gimli Glider Voice-over 0:19 -
Oscilloscope intro Oscilloscope 0:20 -
A keystroke in cross-section Explainer 0:20 -
A ring called Orbit UI motion 0:10 -
The bug that wants to stay Short film 0:20 -
Shin, not foot Voice-over 0:17 -
Jellyfish in a light shaft Organic loop 0:18 -
A logo that comes alive Logo reveal 0:08 -
How circles draw any shape Explainer 0:20 -
Pixel wizard Pixel art 0:16 -
The shortest war Voice-over 0:16 -
Loose mosaic wall Mosaic 0:20 -
Near fall Physics simulation 0:09 -
A Negroni, explained Explainer 0:20 -
Where the fuel money goes Voice-over 0:19.5 -
One print, nothing else Title sequence 0:20 -
Infinite zoom into the detail Infinite zoom 0:15 -
Cube stack Short film 0:07 -
A request at 22:47 Chat story 0:17 -
Claude Code in three steps Voice-over 0:17.5 -
The inbox factory Isometric loop 0:12 -
From 0 to 100 % soft Physics simulation 0:10 -
One line, three inks Showreel 0:20 -
The slicing machine Isometric loop 0:09 -
How backlinks work Explainer 0:20 -
A ball that grows with every bounce Physics simulation 0:10 -
One shape, fourteen states UI motion 0:14 -
What makes a home Paper cut-out 0:20 -
Words that carry Kinetic typography 0:20 -
Shard logo reveal Logo reveal 0:11