Juggling notation made physical: true parabolas, a ladder diagram and the state graph.
A siteswap lists throw heights, one per beat with the hands alternating, and it is jugglable exactly when no two balls land on the same beat: the permutation test i + t_i mod p, after which the average theorem gives the ball count. The parser also reads multiplex throws like [43]14 and synchronous patterns like (4,2x)(2x,4), checking that every catch at every hand is matched by a throw. Each throw of height h is caught h minus the dwell time later, so the juggler's hands run a scoop and every ball follows the parabola that joins them under g = 9.81 m/s^2, with the camera zooming out (the 9 in 97531 really rises more than three meters) and long-exposure traces of the last few beats. Below, a ladder diagram runs ahead of the clock, and beside it the state graph (which of the next beats already have a ball due) shows the pattern as a cycle; switching between patterns with the same ball count follows the shortest path found by breadth-first search, drawn in red.
Try it. Pick a pattern from the ribbon, or type one (digits, a to z, [multiplex], (sync)) and press Enter; the parser explains why a pattern fails. Click any state in the graph to make the juggler detour through it and find the way back. Space or the arrow keys step through the ribbon.
Paste this into Claude Code, Codex or any coding agent to get a simple version running, then take it wherever you like.
Build a siteswap juggling animator with JavaScript and the HTML canvas element. Put everything in a single index.html file with no libraries or build step, so I can open it directly in a browser.
Start simple:
- Make a canvas that fills the window, stays sharp on high-DPI screens (scale by devicePixelRatio), and resizes with the window.
- A siteswap like 531 is a list of throw heights, one per beat, with the hands alternating. A throw of height h lands h beats later, so odd throws cross to the other hand and even throws come back to the same hand.
- Validate the pattern: the average of the throws must be a whole number (the number of balls), and (i + t_i) mod p must hit every beat exactly once. Show a clear message when it fails.
- Animate it: give each beat a duration (about 0.25 seconds) and a dwell time (about 0.6 beats). A ball thrown at beat t is caught at beat t + h - dwell, and in between it follows the parabola that joins the throwing and catching hand positions under real gravity (9.81 m/s^2, with a sensible pixels-per-meter scale).
- Move each hand in a small loop: catch on the outside, carry down and in, throw from the inside, return empty.
- Draw a simple figure with arms that reach the hands, and colored balls.
Once that works, make it rich:
- Add a text box to type a pattern, and buttons for famous ones: 3, 441, 531, 51, 423, 744, 97531.
- Draw a scrolling ladder diagram below the juggler: two rails for the hands and an arc for every throw.
- Zoom the view out for high throws so the arcs stay physically correct.
Explain the key ideas in short code comments. When you're done, tell me how to open it and suggest three directions I could take it next, such as the state graph of patterns with shortest transitions between them, multiplex and synchronous notation, or long-exposure light trails.