Real time cloth simulation based on mass-spring systems

This project is based on the tutorial by Jared Counts. The tutorial explains how to simulate tearable cloth and ragdolls. For this project I only implemented the tearable cloth.

The first fragment shows the simulation in action.

I also played a bit with the damping factor. Normally the damping factor should be positive to make sure that the solution returns to its steady state (remember the first fragment). If the damping is taken equal to zero, the steady state solution can never be achieved because the piece of cloth would never stop moving. Taking a negative damping factor could create an "explosive situation"! This is because now, not only will it never stop moving, the curtain will also keep accelerating. This is shown in the next fragment.

The first two fragments both show a piece of cloth where the whole upper line is fixed. The final fragment mixes things up and shows what happens when the piece of cloth is only fixed at three points.