Mass-spring system

This is an introduction to physically-based animation using mass-spring systems.

Download, decompress and run massSpring.zip.
The programs displays a string of particles and springs. Type CTRL+SPACE to perform one time step, or SPACE to animate continuously.

Understand the program

question Integration Complete the implementation of the integration scheme (update of positions and velocities) in the update() function of the particle system. Once this is done, notice that you can interactively drag particles using the mouse andSHIFT+LEFT-CLICK

question Fixed object The fixed particle does not move because it has been assigned a null mass. Explain the trick used to obtain fixed objects using a null mass

question Divergence  The explicit integration scheme can not avoid divergence for high stiffnesses or large computation times. Dump images and produce a short video which illustrates this.

Air damping

To improve the stability, implement a viscous force proportional and opposed to the velocity of each particle: f=-air_damping*v where v is the velocity of the particle and air_damping is a positive value.

question Air damping Give one example of motion for which the consequences of air damping and spring damping differ significantly. Shoot two short videos to illustrate the difference, and explain.


High stiffness

Create a 10-particle string attached at both ends, as illustrated in the following image.

question stiff springs What  is (approximately) the highest stiffness you can apply to this string, without changing the time step and the gravity ? Take a picture of the string at rest, with this stiffness.

question position-based dynamics  Implement Provot's spring length limitation method, and apply it to the same string to make it as stiff as possible. Take a picture of the string at rest. What parameters do you apply ?