Physics
Spring pendulum
Two degrees of freedom exchanging energy between modes.

What happens
A mass on a spring that can both swing and stretch: two degrees of freedom trading energy back and forth. Tune the stiffness so the bounce frequency is about twice the swing frequency and the trade becomes resonant, with swinging dying out and reviving in slow beats. The r(t) and θ(t) charts show the exchange.
Equations used in the module
Equations m r'' = −k(|r|−r₀)r/|r| + mg E = ½m|v|² + ½k(|r|−r₀)² + mgy r'' = rθ'² − (k/m)(r−r₀) + g cos θ θ'' = −(2r'θ' + g sin θ)/r; r > 0 ω_s ≈ 2ω_p


