Elastic Materials

In this project, elastic materials were simulated as mass-spring-damper systems. Basically a set of particles combined with springs. By changing parameters, like spring constants and damper constants, the material behaves differently.

We were four students working together in this project as a part of the Modeling Project course at Linköping Univerity and I contributed with the following:

  • Setting up a build environment.
  • High level program structure
  • Simple ODE solver
  • Modeling of forces acting on particles
  • Indexing of springs and dampers connectivity
  • Triangle indexing for correct rendering
  • Setting up a rendering pipeline in OpenGL
  • GLSL shader programming

Test implementation

First, the system was implemented in Matlab as a proof of concept. The project evolved from a simulation in 1D followed by 2D in Matlab and was then ported to C++ where OpenGL was used for graphics.

1D simulation in Matlab.

2D simulation in Matlab.

2D simulation in C++.

3D simulation in C++.