Skip to content

liumu96/Fast-Mass-Spring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fast-Mass-Spring

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.

Getting Started

  1. 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
  2. Build: Only tested in Mac M2.

    cd Fast-Mass-Spring
    mkdir build && cd build
    cmake ..
    make
  3. Run: Press W to run the program

    ./fast-mass-spring

Dependencies

  • OpenGL, GLFW, GLEW, GLM for rendering.
  • OpenMesh for computing normals.
  • Eigen for sparse matrix algebra

Algorithms


  1. Build Mesh : vertices → faces
  2. Build Spring System: build grid
  3. Solver:
    1. precompute system matrix
    2. iterations:
    • fix x → solve the optimal d (local)
    • fix d → solve the optima x (global)

The Notes

Results

curtain-hang curtain-ball

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] Ladislav Kavan: Physics-based Animation : Fast Mass Simulation youtube

About

Fast Simulation of Mass-Spring Systems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors