Ollin

Motion

Animation driven by time. The draw loop runs continuously by default, so nothing has to start it.

ExampleWhat it shows
ArcModesthe three drawArc closing modes (open, chord, pie) side by side under an animated sweep
Attractora rotating de Jong–style chaotic attractor sampled into ~98k fine dots a frame, which blur together into a soft radial bloom: the main example of drawPoint at volume (SDF)
Automationkeyframed parameters: four parameters, each on its own track (size, place, and color move smoothly, and the fill switch steps), and the sketch reads its own tracks back to plot them under the stage (automate, Automation)
Beatsthe clock's beats charted: every(1), an off-beat every(1, phase: 0.5), a fast every(0.25), and a frame-counted everyFrames(60) each stamp their own lane over a twelve-second lap, and after(4) fires once
ContourWalkerswalkers that step along the contours of a surface fitted through nine pins, turned a little uphill so they spiral in to the peaks, steered by the fitted field's exact gradient(at:), or by central differences over noise with the field parameter switched
DoublePendulumthe butterfly effect: 24 DoublePendulums start a ten-thousandth of a radian apart, swing together as one line, then separate into 24 unrelated motions
Easingfour dots race to the same target flip on different @Eased curves (linear, ease-in, ease-out, ease-in-out), so they pull apart in flight
EasingGalleryall thirty named Easing curves plotted in a grid, each with a dot that follows its shape, and the back, elastic, and bounce rows overshoot their cells
DerivedCurvesone curve picked on the inspector and the two derived from it, reversed() and mirrored(), each moving a dot on the same out-and-back trip beside a plot of its shape
EllipseFieldrows of white outlines in two drifting columns: whole drawEllipse rings on the left and chord-closed drawArc crescents on the right, with position, squash, and arc sweep all driven by signedNoise
EpicyclesFourier epicycles: a chain of spinning circles redraws an SVG whale, the term count is a parameter, and one lap takes one loopDuration
FlowFielda curlNoise flow field: short lines follow the divergence-free curl and drift with time
Formulasix parameters driven by rules typed as text rather than written in Swift, and the sketch prints the rule behind each one under the ring (drive, Formula)
FormulaPartsa parameter made of several numbers, with one rule per part: a rectangle whose size follows a rule and whose place does not, a dot that reads the rectangle back part by part, a color under a rule, and a pair of ends under a rule (drive(_:x:y:))
Harmonographa harmonograph in motion: damped pendulums (their settings drawn from the seeded random, one figure per variation) weave a nested trace, and the trace replays pen-first, exactly as the machine would draw it (Harmonograph)
InverseKinematicsfive IKChain tentacles reach toward a swimming lure, a stiffness parameter (maxBend) runs from rope to whip, and a toggle swaps the even solver for the tip-curling one
Lissajousthe Lissajous table: a grid of lissajous(a:b:) figures with the column frequency against the row frequency, a shared phase that rolls every figure through its family, and tracers that move at true parametric speed
Mandalanested, counter-rotating hollow shapes (each a framed band in one call) that slide into a moiré (hollow, SDF)
Morphingshape morphing: a star tweens into a blob and the blob into a donut, and every in-between step is a real vector Shape (ShapeMorph, morphed(toward:))
Myriad8,100 noise-driven circles on the SDF path, thousands of shapes at full speed, and a parameter swaps them for rounded rects (the corner radius sweeps from square to pill, and each rect turns by its own angle)
NBodytwo toy galaxies (NBody.disk) on a bound grazing orbit: tides pull streamer arms off both disks, then the survivors fall back and merge
Orbitsten circles orbiting the center at rising speeds
PerfectLoopa sketch that repeats exactly: loopDuration declares the period, looping noise closes the motion, and --export-loop renders one seamless lap
PetalsdrawOrientedVesica lenses and interleaved drawOrientedBox bars span counter-rotating rings, their tips and endpoints drift, and their waists and thicknesses widen and narrow (SDF)
SineSweepa circle swept across the canvas by sin(time)
Smoothing@Smoothed cleans a jittery figure-eight signal with the 1€ filter: the raw input shows as faint dots, and the smoothed output as a smooth tracking trail
Spokesa sunburst of thick, round-capped drawLine spokes that pulse with time (capsule SDF)
Springsthe spring family: five dots race the same hop on different bounce settings, and a @Sprung chaser follows the mouse with momentum (click to kick it)
Steeringsteering creatures (Vehicle): a group follows a wavy loop while keeping their distance from each other, wanderers roam and leave trails, and a pursuer intercepts the lead follower
Swaythe five SwayShapes (.sine, .triangle, .saw, .square, and a .wander that still closes its lap) plotted over one lap with a dot following each, and a circle sized live by the same call (sway(over:in:shape:phase:))
Timelinea Timeline<Vector2> walks a dot around a square, with one easing per side and a hold at each corner, while a second timeline grows and shrinks its size, and progress is tracked below with a tick per keyframe
Traila Lissajous point traced by a 600-segment polyline

Run one with swift run Example-Motion-<Name>, for example swift run Example-Motion-SineSweep.

↑↓ move ↩ open