Real-time cloth simulation

This project was a part of the course "Animation and Modelling". I choose to implement a cloth simulator using spring-mass system with euler integration. The cloth is made up of the masses connected with three different spring types to simulate the different forces that appears in real cloth (stretching, shearing and bending).

A special thing with my simulator is that it uses levelsets to represent rigid bodies. This makes it easy to detect and handle collisions with the cloth with very complex geometry. Collision detection of arbitrary geometry can be very complex using the traditional polygon based approach. Sadly levelsets is not a very memory efficient way to store geometry.

The program was completly developed in C++ and Linux using GLOW user interface.