Alle Motions

Wie aus Kreisen jede Form wird

Erklärclip zur Fourier-Reihe: Epizyklen zeichnen erst eine Welle, dann eine Hand

Created with AI
  1. 0–3,4 s Ein Kreis dreht sich, seine Höhe rollt über die Zeit zu einer Sinuswelle ab
  2. 3,4–8,4 s Drei, dann sieben Kreise hängen aneinander, die Welle wird fast rechteckig, der Gibbs-Überschwinger ist markiert
  3. 8,4–11,2 s Die Zeitachse faltet sich in die Spitze, aus der Welle wird eine geschlossene Kurve, die Kreise stimmen um
  4. 11,2–17 s Der Zähler steigt von 7 auf 64, mit jedem Kreis wird die Kontur schärfer, bis eine Hand dasteht
  5. 17–20 s Die fertige Hand steht kurz, dann lösen sich die Kreise auf und der erste Kreis ist wieder am Anfang
  • Erklärclip
  • 20 s Loop
  • 1080² · 30 fps
  • Canvas 2D
  • 1 MB

Prompt

Englisch · für Claude Code, Codex & Co. · 780 Wörter
Build a 20-second looping explainer, 1080×1080: "how circles draw any shape". Epicycles (circles riding on circles) first unroll into a wave, then draw a closed outline. Nothing is faked: every radius and phase comes from a real decomposition. All on-screen text comes from one small dictionary; ?lang=de switches to German.

DESIGN
A calm, precise teaching film on a dark blueprint ground #101A2A with a faint 54 px grid. Chalk white #E8EDF4 for lines and text, muted blue-grey #8FA0B8 for labels, one accent, chalk yellow #F4C152, used only for the tip, the newest circle, its spectrum bar and the Gibbs marking. Instrument Serif for the caption (47 px, two lines, top left) and the maths, Geist for small tracked uppercase labels, Geist Mono for every number. Top right: "n = 64" as one left-aligned block. Bottom, under a hairline: left a spectrum of 64 slots (bar height = amplitude on a log scale, pending slots as dots, the newest term in the accent, a readout "k = −12" for its frequency), right the formula f(t) = Σ aₙ · e^(i n t), the sigma drawn as a filled glyph with thick and thin strokes, variables slanted.

STORYBOARD
0–3.4 s  One circle on the left, radius vector turning once per 2.4 s. A dashed connector carries the height of its tip to a graph axis, where it unrolls over time into a sine wave. Caption: "One circle. Its height, unrolled over time, is a sine wave."
3.4–8.4 s  Two more circles join tip to tail (frequencies 3 and 5, radii 4/(πk)), then four more up to k = 13. The trace turns into a square wave; the true square wave runs along dashed. With seven circles two thin accent lines mark the level the partial sum really reaches, labelled "Gibbs overshoot +9 % of the jump".
8.4–11.2 s  The transition is the idea: the time axis folds into the tip. Each trace point moves from "height over time" to "where the tip was", so the wave collapses into the closed curve the same seven circles draw in the plane, while the chain glides to the centre and the graph leaves with it. Then the seven circles retune from the wave's coefficients to the first seven of a hand outline.
11.2–17 s  n counts 7 … 64. Every new circle (frequencies +1, −1, +2, −2, … ±32) grows in at the end of the chain, its bar rises in the spectrum, and the closed curve sharpens from a blob into a hand with five fingers. The true outline sits behind as a faint dotted ghost.
17–20 s  Hold on "64 circles draw a hand." Then the circles dissolve from the outside in, n runs back to 1, the remaining circle returns to the left, the graph axis comes back and the connector grows out of the tip: frame 0.

MOTION
The hand is not drawn by hand: five capsules, a palm and a wrist are joined in a distance field with a smooth minimum, the zero contour is traced counter-clockwise, resampled to 1024 points by arc length and decomposed with a DFT; the 64 circles are those coefficients. The Gibbs level is the measured maximum of the 7-term sum. One global angle drives everything: constant while unrolling, slower while the detail comes in, exactly seven turns in 20 s so the loop closes. The trail is a pure function of time: history of the tip while unrolling, the full closed curve of the current circles afterwards. Critically damped springs normalised to land exactly on 1, nothing overshoots; text changes only when the picture is calm.

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 1 s, then every 0.1 s from 8.0 to 11.2 and from 18.0 to 19.97, in both languages; frame 0 must equal frame 19.97.

So bauen Sie es nach

  1. 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.

  2. 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.

  3. 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.

Befehle zum Rendern render.mjs herunterladen
# 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

So entsteht ein Clip mit Claude Code

Hintergrund

Ein Erklärclip als Motion Graphic: Ein Kreis rollt zur Sinuswelle ab, sieben Kreise nähern eine Rechteckwelle samt Gibbs-Überschwinger an, dann faltet sich die Zeitachse ein und 64 Kreise zeichnen die Kontur einer Hand. Radien und Phasen stammen aus einer echten Zerlegung, das Spektrum läuft mit. 20 Sekunden, Deutsch und Englisch, mit Prompt.

Was ich dabei gelernt habe

Ein Lehrfilm über Mathematik darf nichts vortäuschen. Deshalb rechne ich die Hand beim Laden wirklich aus: Kontur abtasten, per DFT zerlegen, die 64 Kreise sind genau diese Koeffizienten. Den Übergang von der Welle zur Zeichnung habe ich nicht überblendet, sondern die Zeitachse eingefaltet. So sieht man, dass es dieselbe Bewegung ist.

Inspiration

Ausgangspunkt war ein Prompt von @miguel07code ((öffnet in neuem Tab)) auf Skillry. Den Wortlaut finden Sie dort; der Prompt oben ist meine eigene Fassung.

Weitere Motions

Kontakt

Lassen Sie uns
Ihr Projekt
besprechen.

Schreiben Sie mir eine Nachricht oder füllen Sie das Kontaktformular aus. Ich melde mich innerhalb von 24 Stunden.

Paul Mill

Paul Mill

hallo@paulmill.com