Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.56 KB

README.md

File metadata and controls

54 lines (37 loc) · 1.56 KB

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