Cloth Mesh Physics Project
A cloth simulation using a particle-spring mesh within a simulation box, taking into account collisions with the walls, ground and a sphere.
A cloth simulation using a particle-spring mesh within a simulation box, taking into account collisions with the walls, ground and a sphere.
Goal
The objective of this project was to implement a cloth simulation using a particle-spring mesh of 14 x 18 points within a simulation box, taking into account collisions with the walls, ground and a sphere.
GL Framework
This project was created using an existing GL Framework provided by a teacher with the rendering mesh already implemented. The framerate is fixed to 30fps.
Simulation Details
The Simulation has a mesh that represents a cloth fixed by two points. The Particle System is simulated using either Euler or Verlet. Each particle weighs 1kg.
GUI Control
The simulation runs alongside a GUI that lets the user control various parameters. There is a reset button, but the simulation automatically resets every 20 seconds.The Mesh starts being fixed, but there is a button to unfix it. Gravity values can be tweaked as well.
There are various coefficients that will affect the simulation that can be modified to make the mesh bouncier or bigger. There is a button to add a sphere and modify its position and radius. Last, there is a button that makes the particles within the mesh visible.
The Mesh collides with both the walls and ground and the sphere.