Visualizations
413 / 500

413 · Physics

Hanging Chain Arches

Hang chains and weights, then flip the sheet to turn them into stone arches.

Hooke's rule from 1675: as hangs the flexible chain, so, inverted, stands the rigid arch. A hanging chain can only pull, so under its own weight and any loads it settles into the one shape with every link in pure tension, and the mirror image of that curve is an arch with every stone in pure compression, its line of thrust running down the middle. The chains are position-based dynamics with many substeps: each link is a pull-only distance constraint, and its accumulated Lagrange multiplier is the link's tension, which tints it blue. Flipping the view turns each link into a voussoir and each weight into a pinnacle pressing down with the same load that bent the chain, which is how Gaudi found the forms of his churches with strings and sandbags.

Try it. Drag from the beam, or from any point on a chain, to pay out a new chain, and release on the beam, on another chain or in the air. Click a link to hang a weight (click again for heavier, and past the heaviest it comes off), right-click to remove a weight or chain, Backspace removes the newest chain, and drag just beside a chain to tug it. Flip (or F) turns the view; 1 to 4 load a catenary, loaded arches, a cathedral facade and an interlaced arcade, and C clears the sheet.

  • Position-based dynamics
  • Form finding
  • Catenary
  • Line of thrust

View the source · one module, plus a small shared runtime for sizing, the animation loop and input

Build your own

Paste this into Claude Code, Codex or any coding agent to get a simple version running, then take it wherever you like.

Build an interactive hanging chain sketchbook 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. Paint it warm cream paper and draw a horizontal beam near the top.
- Let me drag from the beam to the beam to hang a chain: about 30 particles joined by distance constraints, with both ends pinned.
- Simulate with position-based dynamics: apply gravity, move the particles, then satisfy the link constraints a few times per step. Let links pull but never push (skip a constraint when it is shorter than its rest length). Add a little damping so the chain settles into a catenary.
- Click a link to hang a weight from it on a short thread.

Once that works, add the architectural trick:
- A Flip button that mirrors the whole drawing across the beam line with a smooth animation. In the flipped view draw each link as a stone block (a quad around the chain using its local normal) so the chain becomes an arch, and each weight becomes a pinnacle standing on the arch.
- Measure each link's tension from the size of its constraint corrections and shade the chain blue and the stones red by that force.
- Draw the line of thrust as a dashed line through the middle of the stones.

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 chains that hang from other chains to build a cathedral facade, a side-by-side comparison with a semicircular arch, or a 3D vault made from a net of chains.
PreviousShadow SculptureOne carved object casts three different shadows at once. Draw your own. NextGrand TourPlan a probe's slingshot route past Jupiter, Saturn, Uranus and Neptune.

Related visualizations

  • Tensegrity3D Struts that never touch, floating in a web of cables, found by dynamic relaxation.
  • Truss Bridge BuilderPhysics Draft a bridge on blueprint paper, then send a truck over as each beam shows its stress.
  • Rigid BodiesPhysics Stacked towers of boxes knocked down by a swinging wrecking ball.
  • Tearable ClothPhysics A sheet of Verlet points and springs that sags, swings and rips.
  • TentaclesNature Inverse kinematics tentacles reach and curl toward the pointer.
  • Girih Star PatternsGenerative art Interlaced Islamic star patterns built live from one angle over a hidden tiling.
  • Balancing MobileAlgorithms A red-black or AVL tree hangs as a spring-physics mobile while a plain BST droops.
  • Foucault PendulumPhysics A museum pendulum ploughs a rosette into sand as the Earth turns beneath it.
  • Climbing VineNature Sweet pea shoots circle, grab supports with tendrils and coil into springs.

Use ← and → to move between demos. While the canvas has focus, keys go to the demo instead.

← More from Emergent Mind Labs