Cloth Simulation


Still hanging cloth

This project is a simple cloth simulator. The cloth is simulated by a 2D array of vertices that are connected by neighboring vertices through spring forces. It can use five types of integrators to calculate vertex positions; Euler explicit, Euler semi-implicit, mid-point, Verlet, and RK-4.




Cloth blowing in the wind


The UI allows the manipulation of the strength and direction of gravity, the spring stiffness of the cloth, damping strength,  integrator type, number of vertices, the strength and direction of the wind force, and choose between different sets of anchored point. The arrow keys can also move the anchor points allowing the user to shake and wiggle the cloth.

Textured cloth hanging from its corners.




Using face normals shows the individual vertices