The Cloth Simulation (Memoized version)

Every line in the cloth simulation is technically called a constraint and every point is a point mass (an object with no dimension, just location and mass). All the constraints do is control the distance between each point mass. If two points move too far apart, it will pull them closer. If two points are too close together, it will push them apart. The cloth is really then just a collection of constraints and point masses in a never ending struggle.

Clicking on a single point once caches the calculations for it, whilst clicking on it a second time (try double-clicking) will load from the memoized cache instead.

Sorry, It looks as though your browser does not support the canvas tag... If you can, I suggest that you try Chrome or Safari.

Click and drag to move points. Hold down any key to pin them.

Draw Lines   Draw Points