Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sam007961/FastMassSpring
Interactive cloth simulator using the method described in the SIGGRAPH paper "Fast Simulation of Mass-Spring Systems" by Liu, T., Bargteil, A. W., Obrien, J. F., & Kavan, L.
https://github.com/sam007961/FastMassSpring
cloth-simulation computer-graphics mass-spring-simulation mass-spring-systems opengl
Last synced: 28 days ago
JSON representation
Interactive cloth simulator using the method described in the SIGGRAPH paper "Fast Simulation of Mass-Spring Systems" by Liu, T., Bargteil, A. W., Obrien, J. F., & Kavan, L.
- Host: GitHub
- URL: https://github.com/sam007961/FastMassSpring
- Owner: sam007961
- License: mit
- Created: 2018-12-12T18:46:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-25T17:51:50.000Z (about 4 years ago)
- Last Synced: 2024-05-02T19:21:52.067Z (7 months ago)
- Topics: cloth-simulation, computer-graphics, mass-spring-simulation, mass-spring-systems, opengl
- Language: C++
- Homepage:
- Size: 67.4 KB
- Stars: 212
- Watchers: 13
- Forks: 30
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- AwesomeCppGameDev - FastMassSpring - Spring Systems" by Liu, T., Bargteil, A. W., Obrien, J. F., & Kavan, L. (Physics)
README
### Fast Mass-Spring System Simulator
A C++ implementation of *Fast Simulation of Mass-Spring Systems* [1], rendered with OpenGL.
The dynamic inverse procedure described in [2] was implemented to constrain spring deformations
and prevent the "super-elastic" effect when using large time-steps.### Dependencies
* **OpenGL, freeGLUT, GLEW, GLM** for rendering.
* **OpenMesh** for computing normals.
* **Eigen** for sparse matrix algebra.### Building
You need to install OpenGL, GLEW and GLUT on your system to build. The rest of the dependencies
will be automatically fetched by cmake during configuration.To build, run the following commands from the root directory of the project:
``` bash
mkdir build
cd build
cmake ..
cmake --build .
```On Windows, you will likely need to specify the directories containing GLUT and GLEW in CMAKE_PREFIX_PATH so that cmake can find them.
``` bash
cmake .. -DCMAKE_PERFIX_PATH:PATH=/path/to/libs
```You will also need to copy the DLLs to the build directory if they are not available globally.
### Demonstration
![curtain_hang](https://user-images.githubusercontent.com/24758349/79005907-97ad1100-7b60-11ea-9e27-90375461beaf.gif)
![curtain_ball](https://user-images.githubusercontent.com/24758349/79005924-9d0a5b80-7b60-11ea-8ce4-d9fc683441d7.gif)### References
[1] Liu, T., Bargteil, A. W., Obrien, J. F., & Kavan, L. (2013). Fast simulation of mass-spring systems. *ACM Transactions on Graphics,32*(6), 1-7. doi:10.1145/2508363.2508406
[2] Provot, X. (1995). Deformation constraints in a mass-spring modelto describe rigid cloth behavior. *InGraphics Interface* 1995,147-154.