Skip to content

Physics-based simulation of cloth using mass-spring systems

Notifications You must be signed in to change notification settings

Prakhar314/MSS-Cloth-Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloth Simulation Using Mass Spring Systems

Physics-based simulation of cloth using mass-spring systems.

Features

  • 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

Demo

Installation

  1. 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
  1. Create build directory in the project root.
mkdir build
  1. Build the project
cd build
cmake ..
make
  1. Run any of the examples: e1, e2, e3, ...