Double Pendulum Art — reference guide
Open the Studio tab. Two pendulums start running immediately. You don't need to do anything — the trails draw themselves. Give it 30 seconds before adjusting anything.
Select a pendulum by clicking its name in the Pendulums list. The selected one is outlined in white on the canvas. All the Shape & Motion controls apply to the selected pendulum only.
Hit Clear to wipe trails and start fresh. Hit Save image when you're happy.
| Command | Description |
|---|---|
| Pause / Play | Freeze or resume the simulation. Trails stay on screen; only new drawing stops. |
| Clear | Wipe all trails and reset the timer. Pendulums keep their current position and settings. |
| Reset all | Remove all pendulums and restore defaults. Shows a confirmation dialog first. |
| Move pivot | Toggle pivot drag mode. When on, drag a pendulum's anchor dot to reposition it. Simulation pauses during drag and resumes on release. |
| Hide / Show rods | Toggle the arm lines connecting pivot to balls. |
| Hide / Show balls | Toggle the circular bob indicators at the end of each arm. |
| Share | Generate a URL encoding all current settings. Opening it loads the exact same configuration. |
| Publish | Save a thumbnail to the shared gallery. 24-hour cooldown between publishes. |
| Save image | Download the canvas as a full-resolution PNG. Choose trails only or include rods and balls. |
Multiple pendulums run simultaneously through the same physics. Each draws its own trail in its own color. Click a name to select it. Click × to delete it and clear its trail. + add pendulum creates a new one.
Applies to the selected pendulum only. Changing either angle resets that pendulum's velocity to zero and starts it from the new position.
| Parameter | Description |
|---|---|
|
Angle 1 per pendulum |
Starting angle of the upper arm in degrees from vertical. 0° = straight down, 90° = right, 180° = straight up. |
|
Angle 2 per pendulum |
Starting angle of the lower arm. Small differences in this value between pendulums cause large divergence in the resulting trails. |
|
Length 1 per pendulum |
Upper arm length as a multiple of the base scale. Longer = lower arm swings in a wider orbit. |
|
Length 2 per pendulum |
Lower arm length. Longer = wider, more dramatic trails. Shorter = tight spirals. |
|
Mass 1 per pendulum |
Upper bob mass. Heavier upper bob makes the top arm dominate; lower arm follows more passively. |
|
Mass 2 per pendulum |
Lower bob mass. Heavier lower bob increases chaos and spreads the trail further. |
|
Opacity per pendulum |
Transparency of each trail segment. Lower = subtle overlap blending. Higher = every stroke fully visible. |
|
Thickness per pendulum |
Width in pixels of each trail segment. |
These settings apply globally to all pendulums.
| Parameter | Description |
|---|---|
|
Gravity global |
Gravitational constant. Higher = faster swinging. Earth real-world value is 9.8. |
|
Speed global |
Simulation time multiplier. At 2× the pendulum moves twice as fast; physics stay accurate. Use 3–4× to fill the canvas quickly. |
|
Damping global |
Energy loss per step, like air resistance. 0 = swings forever. Increase to make pendulums spiral inward and come to rest. |
|
Fade global |
Controls how quickly old trail segments disappear. Off = trails stay forever. Faster fade = comet-tail effect where only the recent path is visible. |
|
Blend global |
additive — overlapping areas glow brighter (best for dark backgrounds). normal — paints on top. multiply — overlaps get darker (use on light backgrounds). screen / overlay — mid-range effects. |
Click any swatch to apply that color to the selected pendulum's trail. Use the color picker or type a hex code directly to set a custom color. The trail updates immediately.
Check one or more pendulums, then click Erase to remove just those trails without stopping the simulation or deleting the pendulum. Use All / None to select everything or clear the selection.
| Input | Action |
|---|---|
| Scroll wheel | Zoom in/out centered on the cursor. |
| Click + drag | Pan the canvas. |
| + / − buttons | Zoom controls in the bottom-left corner. |
| ⌂ button | Reset to 100% zoom and center the view. |
The simulation keeps running while you navigate. Trails are drawn in canvas space, not screen space — zooming reveals detail without affecting physics.
Enable Move pivot in the toolbar. Each pendulum's anchor point becomes draggable. The simulation pauses while you drag and resumes on release. Drag pivots to different areas of the canvas to create intersecting compositions.
Shows art published by all users. Hover a card to reveal: Load — bring that piece's settings into the studio. Share — copy a URL. ✕ — delete the card.
Click a card image to open full-screen with download and load options.
| Action | Output |
|---|---|
| Save image | Full-resolution PNG download. Choose Art only (trails only) or With pendulum (includes rods and balls). |
| Share | URL encoding all pendulum settings. Sharing it loads the exact same starting configuration. |
| Publish | Saves a 480×300 JPEG thumbnail to the shared gallery with a title and optional author name. |
A generative art tool running entirely in your browser. The second bob's trail is the painting — no randomness, no noise, no tricks. Just a differential equation integrated forward until something beautiful happens.
A double pendulum has two rigid arms connected end to end, hanging from a fixed pivot. The full state at any moment is four numbers:
theta1 — angle of arm 1 from verticaltheta2 — angle of arm 2 from verticalomega1 — angular velocity of arm 1omega2 — angular velocity of arm 2Every frame, the second bob's position is computed and a line is drawn from where it was to where it is now.
The equations come from the Lagrangian — L = T − V, kinetic minus potential energy.
denom = 2*m1 + m2 - m2*cos(2*θ1 - 2*θ2)
α1 = [ -g*(2*m1+m2)*sin(θ1) - m2*g*sin(θ1-2*θ2)
- 2*sin(θ1-θ2)*m2*(ω2²*L2 + ω1²*L1*cos(θ1-θ2)) ]
/ (L1 * denom)
α2 = [ 2*sin(θ1-θ2)*(ω1²*L1*(m1+m2)
+ g*(m1+m2)*cos(θ1) + ω2²*L2*m2*cos(θ1-θ2)) ]
/ (L2 * (L2/L1) * denom)
4th-order Runge-Kutta (RK4), 8 substeps per rendered frame. Each substep checks for NaN/Infinity in the result and clamps velocities to prevent integration blow-up at extreme parameter combinations.
Same initial conditions always produce the same trail. Change the starting angle by 0.001° and within seconds the two runs look completely different.
Two canvas layers: the trail canvas is persistent (cleared only on Clear), and the pendulum canvas redraws every frame. Each pendulum also writes to its own offscreen canvas, enabling selective per-pendulum trail erasure.
Everything runs locally in your browser. The gallery uses shared storage so posts are visible to other users — hence the 24-hour publish cooldown.