Experiment № 032 · The story
Verlet Cloth
Why I picked it
Almost everything else in this collection is something to watch — a system that runs itself while you tune dials from the side. I wanted one you could grab. Cloth is the most satisfying thing in graphics to reach into: you tug a corner and a wave of slack races across the whole sheet, you let go and it swings and settles, you slash it and it parts and sags around the wound. And the way it's done is almost a magic trick. There is no real "physics of fabric" in here — no springs storing energy, no forces between threads. There is only a grid of points that remember where they were a moment ago, and a list of links that quietly insist "you two should stay this far apart." Thomas Jakobsen wrote up the technique for the game Hitman in 2001, and it's run cloth, rope and ragdolls in games ever since.
What I enjoy about it
How little it takes. Each point moves itself by Verlet integration — its velocity is never stored anywhere, it's just inferred from the gap between where it is and where it was, which means gravity and your dragging cursor are the only things that ever push it. Then comes the part I find genuinely beautiful: the constraints don't get solved, they get nagged. Sweep over every link, and if two points have drifted too far apart or too close, shove them halfway back to the right distance. One pass barely helps. But run the same dumb pass five or eight times a frame and the whole sheet stiffens into something that hangs and folds like real fabric — rigidity emerging purely from repetition, not from any single clever equation. Tearing is just as cheap: a link that's stretched past its breaking point is simply deleted, and the cloth discovers the hole on its own. Crank the stiffness slider down to 1 and watch it go limp and rubbery; crank it up and it snaps taut.
Something you might take away
You don't always need to solve the hard problem in one shot. The honest way to make this cloth behave would be a big system of coupled equations you balance all at once. The cheat that actually ships is to state every constraint locally — "stay this far from your neighbour" — and then just relax them, over and over, letting each small correction nudge the others until the whole thing quietly agrees with itself. It almost never lands exactly right, and it doesn't have to; it lands close, fast, and stable. A lot of the world gets built that way — not by one perfect calculation, but by many cheap corrections, repeated until the disagreements are too small to feel.