Spring-Physics Simulation

Project Type Educational Project
Tech C++, OpenGL
Date Autumn 2011

This project's aim was to learn how to discretely simulate springs in a physically accurate manner. One of the requirements of the simulation was that each spring's properties (damping, stiffness, rest length), are fully configurable.

In the video and the images below, springs are represented as white, blue or red lines between particles which are represented as spheres. A spring's color represents the state of the spring:

  • White: At rest-length
  • Blue: Compressed
  • Red: Expanded (Stretched)

A sphere's color indicates whether it's static (pink) or dynamic (green).