Ein Ball, der mit jedem Aufprall wächst
Physik-Simulation im Hochformat: ein Ball, der bei jedem Aufprall größer wird
- 0–2,16 s Der kleine Ball wird hochgeworfen, fällt und springt im Zickzack über den Boden
- 2,16–4,99 s Gleichmäßiger Rhythmus, jeder Aufprall macht den Ball 7 % größer und hinterlässt Licht auf dem Ring
- 4,99–7,35 s Der Ball trifft jetzt auch oben, die Abstände werden kürzer
- 7,35–9,2 s Die Aufpralle überschlagen sich, der letzte lässt nicht los, der Ball füllt den Ring und drückt ihn nach außen
- 9,2–10 s Der Ball platzt, seine Haut läuft über den Ring, der Kern schrumpft zurück zum Startball, der Zähler läuft auf null
- Physik-Simulation
- 10 s Loop
- 1080 × 1920 · 30 fps
- Canvas 2D
- 666 KB
Prompt
Build a 10-second looping physics short in portrait 9:16 — stage 1080×1920 CSS px (not square) — after the format "A ball, but every bounce makes it bigger": a ball bounces inside a ring under gravity, every bounce makes it 7 % bigger, faster and denser, until it fills the ring and pops back into the ball it started as.
DESIGN
Dark, minimal, one light from the top left. Ground #0D0E12 with a faint grey light falling from the top left; inside the ring an arena a hair lighter (#13151B). Ring: centre (540, 930), radius 390, 4 px stroke in #2E323B. Ball: flat colour from a nine-step palette (#FF5D5D, #FF8A3D, #FFC145, #B8E04A, #3FD8A0, #35C2E8, #4C8DFF, #8A6CFF, #E35FD1), a soft white highlight top left, a dark falloff bottom right, a soft radial shadow offset down-right and clipped to the arena. Hook in Geist 600 60 px, two centred lines at y 300/376 ("A ball, but every bounce / makes it bigger"; DE "Ein Ball, der mit jedem / Aufprall wächst"); the last word carries the ball's colour. Below the ring a counter in Geist Mono 46 px, "bounces: 07" (label grey, two digits white) and under it "size ×1.00" in 26 px. Keep the top 10 %, the bottom 22 % and the right 12 % free of anything important. Banned: particles, confetti, coloured glows on text, bouncy easing.
STORYBOARD
0–2.16 The start ball (r 44) is tossed up out of the top left and falls; the first five bounces zigzag across the floor.
2.16–4.99 A steady left-right rhythm; each bounce: +7 % radius, one palette step, a flash on the ring.
4.99–7.35 The ball now hits the top as well; the gaps shrink from about 0.35 s to 0.22 s.
7.35–9.2 Climax: bounces every 0.08–0.2 s. The last one (31, at 8.44) does not let go — the ball grows on until it fills the ring; from 8.78 the ring bulges 9 px and the ball lightens a little.
9.2–10 Pop: white flash on the ball, its skin runs out over the ring as a thin wave, the whole ring flashes. The core collapses (radius ease-out quintic) along a Hermite curve back to the start position and arrives with the start velocity, so frame 0 follows without a seam. The counter's two digits drop out of their mask one after the other and 00 drops in from above, the colour steps back through the palette.
MOTION
Real physics: gravity 5249 px/s², elastic reflection about the wall normal, growth as a critically damped spring 1 − (1 + w·t)·e^(−w·t) (w = 38). Solve it offline with exact contact times (ballistic flight between contacts, bisection on |p| + r = R) and store every contact as a table, so each frame is closed-form in t and identical in every browser. Squash on contact: flatten along the normal by up to 30 %, keeping the wall-side extent exact; in flight a slight stretch along the velocity, never past the gap to the wall. Ring per bounce: a white-hot flash at the contact (70 ms), an afterglow in the ball's colour that spreads along the ring and fades (0.85 s), a dent that springs back critically damped; the ring path is a Catmull-Rom through 240 samples with a conic gradient as its stroke, the glow as additive nested strokes. Hold the previous loop's afterglow at the start. Motion blur: average 16 samples of the ball over half a frame as a running mean on opaque copies (a premultiplied sum leaves banding). Counter digits roll as an odometer in 0.14 s, a new digit starts in the ball's colour. The hook word glides through the palette instead of stepping. ?lang=de|en switches the texts.
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 0.5 s from 0 to 10, plus every 0.1 s across 1.66–2.66, 4.49–5.49, 6.85–7.85, 7.94–8.94, 8.7–9.7 and the loop seam 9.5–0.5 — in both languages, with 2× and 3× crops of the contact, the counter and the ring edge. So bauen Sie es nach
-
Prompt in einen Coding-Agenten geben
Einen leeren Ordner anlegen, den Prompt in Claude Code, Codex oder Cursor einfügen. Der Agent schreibt eine HTML-Seite und ein Script — die Animation läuft danach direkt im Browser.
-
Standbilder prüfen lassen
Der Prompt verlangt, dass der Agent Standbilder rendert und selbst ansieht. Schärfen Sie nur nach, was Ihnen am Bild nicht gefällt: „Szene 3 ist zu voll“ wirkt besser als ein neuer Prompt.
-
Zu MP4 rendern
Weil jede Animation über
window.MOTION.seek(t)jedes Bild exakt zeichnen kann, rendert ein kleines Script sie Bild für Bild — ohne Ruckler, ohne Bildschirmaufnahme. Danach setzt ffmpeg die Bilder zum Clip zusammen.
# 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
Hintergrund
Ein Ball springt in einem Ring, und jeder Aufprall macht ihn 7 % größer, bunter und schneller, bis er den Ring füllt und in den Ball zurückplatzt, mit dem alles anfing. 10 Sekunden, 9:16, als Code gebaut — mit Prompt zum Nachbauen.
Was ich dabei gelernt habe
Echte Physik und ein perfekter Loop vertragen sich nur, wenn die Simulation vorher gelöst ist: Ich habe jeden Aufprall mit exaktem Zeitpunkt berechnet und als Tabelle abgelegt, dazwischen fliegt der Ball geschlossen berechnet. Dann ist jedes Bild eine reine Funktion der Zeit, und das Ende kann genau in den Anfang zurückfallen.
Inspiration
Vorbild war ein Video von @jdg_creative ((öffnet in neuem Tab)) auf TikTok. Gebaut habe ich eine eigene Fassung des Formats, nicht das Video selbst; der Prompt oben beschreibt genau diese Fassung.
Weitere Motions
-
Eine Agenten-Plattform, vorgestellt UI-Motion 0:15 -
Agenten, die das Modell wählen UI-Motion 0:14 -
Ein Satz wird App UI-Motion 0:15 -
Ein Betriebssystem, vorgestellt UI-Motion 0:47.2 -
Ihr neuer Design-Partner Mit Sprecher 0:54.3 -
Zehn Kilometer, schwebend UGC-Ad 0:12.6 -
Der Weg einer Bestellung Erklärclip 0:34 -
Mach es lebendig Kinetic Typography 0:08 -
Aus Rauschen wird ein Ablauf Partikel 0:14 -
Der Gimli Glider Mit Sprecher 0:19 -
Oszilloskop-Intro Oszilloskop 0:20 -
Ein Tastendruck im Querschnitt Erklärclip 0:20 -
Ein Ring namens Orbit UI-Motion 0:10 -
Der Bug, der bleiben will Kurzfilm 0:20 -
Schienbein, nicht Fuß Mit Sprecher 0:17 -
Quallen im Lichtschacht Organischer Loop 0:18 -
Ein Logo, das lebt Logo-Reveal 0:08 -
Wie aus Kreisen jede Form wird Erklärclip 0:20 -
Pixel-Zauberer Pixel-Art 0:16 -
Der kürzeste Krieg Mit Sprecher 0:16 -
Lose Mosaikwand Mosaik 0:20 -
Fast gefallen Physik-Simulation 0:09 -
Negroni als Erklärclip Erklärclip 0:20 -
Wohin das Tankgeld geht Mit Sprecher 0:19.5 -
Ein Abdruck, sonst nichts Vorspann 0:20 -
Endloszoom ins Detail Endloszoom 0:15 -
Würfelturm Kurzfilm 0:07 -
Anfrage um 22:47 Chat-Story 0:17 -
Claude Code in drei Schritten Mit Sprecher 0:17.5 -
Die Posteingangs-Fabrik Isometrischer Loop 0:12 -
Von 0 auf 100 % weich Physik-Simulation 0:10 -
Eine Linie, drei Tinten Showreel 0:20 -
Die Anfrage bricht aus Physik-Simulation 0:15 -
Die Schneidemaschine Isometrischer Loop 0:09 -
Wie Backlinks wirken Erklärclip 0:20 -
Eine Form, vierzehn Zustände UI-Motion 0:14 -
Was ein Zuhause ausmacht Scherenschnitt 0:20 -
Wörter, die tragen Kinetic Typography 0:20 -
Logo-Reveal aus Splittern Logo-Reveal 0:11