spring (damped harmonic motion) — live canvas animation example

motion & easing8-
trig, angles & vectors8+
collision detection11+
numbers in motion7+
geometry & shapes8+
generative showpieces13+
handy helpers7+

All three balls chase the green target line with the same spring stiffness — only the damping differs. The red one is underdamped: it overshoots and bounces. The green is critically damped (damping = 2·√stiffness): the fastest approach with no overshoot. The blue is overdamped: no bounce, but it crawls. Drag the slider to change the stiffness.