This is a pressure-based softbody dynamics simulator. This model works on a spring-mass system: Every vertex has a mass and is connected to the next vertex by a spring which has default resing length. Firstly, we apply "pressure" which is basically a force on every vertex vectoring outwards from the center. This way we get the ball-shaped softbody which cannot deform, the pressure continuously applies force on the vertices. The springs help us calculate the accumalated force on every vertex.
Then we can apply external forces and see what happens!
Must have installed:
- SFML V2+
- make
- cmake
- C++ compiler
Building:
mkdir build
cd build
cmake ..
make
Running:
./SoftbodySim
Left Mouse Click
Place object
Space
Start simulation
Left Mouse Press
Dragging object
To be implemented: walls and boundries.