Physics Simulation of a String Under Tension
University of Louisville Physics and Astronomy Module Project
Dev Ramtal - Physics for Javascript, Games, Animation, and Simulations
MIT License Copyright (c) 2017 John Kielkopf and Aaron Hill
Help
More
X

Mouse

Left click and drag to push or pull on the end of the rope.

Move up or down to start a transverse wave.
Move left or right to make a compression wave.

X

Explanation

The string is simulated by 15 masses separated by springs that obey Hooke's Law, with some damping for realism. Newton's Second Law is applied to each mass based on the forces it experiences from the masses next to it. The simulation steps one millisecond in each increment, uses the velocities and accelerations at that step, and computes new velocities based on the previous ones.