Skip to content

Levako/softbody-sim-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stargazers Issues

softbody-sim-cpp

About The Project

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!

Prerequisites

Must have installed:

  • SFML V2+
  • make
  • cmake
  • C++ compiler

Installation

Building:

mkdir build
cd build
cmake ..
make

Running:

./SoftbodySim

Usage

Left Mouse Click Place object

Space Start simulation

Left Mouse Press Dragging object

To be implemented: walls and boundries.

Sources

About

Pressure-based softbody simulator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published