Mass-spring systems are a fundamental concept in computer graphics and physics simulations, with applications ranging from animation and video games to engineering and scientific modeling. The paper "Fast Simulation of Mass-Spring Systems" presents innovative techniques that promise to revolutionize the efficiency of simulating these systems.
This repository is based on FastMassSpring, replacing the glut with glew.
-
Clone the Repository: Start by cloning this repository to your local machine.
git clone https://github.com/liumu96/Fast-Mass-Spring cd Fast-Mass-Spring -
Build: Only tested in Mac M2.
cd Fast-Mass-Spring mkdir build && cd build cmake .. make
-
Run: Press
Wtorunthe program./fast-mass-spring
- OpenGL, GLFW, GLEW, GLM for rendering.
- OpenMesh for computing normals.
- Eigen for sparse matrix algebra
- Build Mesh : vertices → faces
- Build Spring System: build grid
- Solver:
- precompute system matrix
- iterations:
- fix x → solve the optimal d (local)
- fix d → solve the optima x (global)
[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] Ladislav Kavan: Physics-based Animation : Fast Mass Simulation youtube




