Labs · Physics

Verlet Physics: Cloth & Ropes

Verlet Physics: Cloth & Ropes simulation

Physics libraries usually split the work into bodies and constraints. This is a small engine written from scratch using Verlet integration: each point remembers only its current and previous position, so velocity is implied by the difference.

Stick constraints then push connected points back to their rest distance, repeated several times per frame (iterations). More iterations make the material stiffer. Overstretched sticks can tear.

Drag the cloth with the left mouse button. Cut it with the right mouse button (or Shift + drag). Then try "Unpin all".

Controls

Evolved into Rigid Circles & the Galton Board, Verlet Ragdolls.