Physics-based simulation of cloth using mass-spring systems.
- Cloth simulation with configurable parameters:
- Dimensions of the sheet
- Mass of each particles
- Spring constants
- Damping constants
- Fixed particles
- Position based dynamics for structural constraints (instead of structural springs)
- Collisions with objects
- Supported shapes: Sphere, cyclinder and rectangles
- Inter particle collisions
- Animation using keyframing
- Creating shape heirarchies
- Interpolation between keyframes using Catmull-Rom splines
- Install required packages:
SDL2
,SDL2 Image
,OpenGL
,GLEW
,CMake
.
# Ubuntu
sudo apt-get install -y libsdl2-image-dev libglm-dev libglew-dev libopengl-dev cmake
- Create
build
directory in the project root.
mkdir build
- Build the project
cd build
cmake ..
make
- Run any of the examples:
e1
,e2
,e3
, ...