Verlet integration + constraint relaxation. Click to tear the cloth!
Verlet integration stores only current and previous positions; velocity is implicit as (pos - prevPos).
Cloth is modeled as a grid of point masses connected by spring constraints.
Constraints are satisfied iteratively: for each constraint, nudge the two endpoints toward their rest length.
After several iterations the cloth behaves realistically. Thomas Jakobsen popularized this in 2001 for game physics.
Click/drag to grab or tear the cloth.