Pendulum and Spring-Mass Simple Harmonic Motion Lab
This interactive physics simulation numerically integrates the exact nonlinear pendulum equation and a damped spring-mass oscillator using fourth-order Runge-Kutta (RK4), rather than a general-purpose game physics engine. Users can compare the measured oscillation period against the small-angle theoretical prediction T = 2π√(L/g), directly observing how the pendulum period diverges from that prediction at large initial angles — a key concept in introductory mechanics courses covering simple harmonic motion, oscillations, and pendulums.
The spring-mass mode demonstrates true simple harmonic motion at any amplitude, with an adjustable damping ratio illustrating underdamped, critically damped, and overdamped behavior. Live phase-space (velocity vs. position) and energy plots make the conservation of mechanical energy and the effect of damping visually explicit.
Keywords: simple harmonic motion simulation, pendulum physics demo, spring mass system, damped oscillator, phase space diagram, small angle approximation, physics education tool, RK4 numerical integration, oscillation period calculator