This program is an implementation of a mass-spring system. Springs are modelled after Hooke's Law. The force of a spring is damped proportional to the velocity of the compression/extension.
This simulation is written in C++ and uses the QT application framework. The graphic user interface allows user to adjust mass, spring constant, damping constant, rest length, and time step while the simulation is running.
The following video shows the program simulating the motion various mass-spring systems.
The simulation camera is controlled using keyboard input:
W/S - Move forward/backward in the direction of camera
A/D - Move camera left/right
T/G - Move up/down along camera's up vector
Q/E - Rotate camera left/right (about up vector)
R/F - Rotate camera down/up (about right side vector)
Z/X - Roll camera left/right about it's direction vector
Download for QT 5.3.0: Mass-Spring System SimulationSource: https://github.com/rlguy/mass_spring_system