Spring-Mass System

Interactive simulation — adjust parameters and watch the visualization update in real time.

Live graphs

How it works

A mass on a frictionless horizontal surface attached to an ideal spring obeys mẍ + cẋ + kx = 0. With light damping, oscillations decay; without driving, energy sloshes between kinetic and potential ½kx².

Key equations

mẍ + cẋ + kx = 0
ω₀ = √(k/m),   PE = ½kx²
Underdamped: ωd = √(ω₀² − (c/2m)²), T = 2π/ωd. Undamped motion uses velocity Verlet for better energy behaviour.