Interactive real time Cloth Simulation

This was a project in the course TNM085 - Modeling and Simulation at Linköpings University in 2012. Together with four friends I implemented a real time cloth simulation using OpenGL and C++. The simulation uses a spring-mass-system consisting of a grid of points connected with a number of springs of different types.

The dots positions are approximated using a second order Euler approximation with a fixed time step. The simulation is interactive, and the user can grab, tear and cut the fabric. A simple collision detection algorithm against static objects was also implemented.

I also implemented a method where each frame of the simulation is recorded to an OBJ file. These series of OBJ files could then be imported into a rendering software, e.g Maya or 3D Studio max, where advanced renderning and lighting methods could be applied to our simulation.

I implemented the methods for user interaction, e.g. grabbing, cutting, and tearing of the cloth.

Full paper, in Swedish, is available here: Report