Horizontal Spring-Mass Simulator

This tool simulates a mass on a horizontal spring, letting you see how its position changes over time under different mass, damping and stiffness settings. Its motion follows the ODE below, where x is the displacement from equilibrium at time t, x′ is the velocity, x″ is the acceleration, and m, b and k are the mass, damping and stiffness parameters you can set in the panel below.

equation of motion

Set the parameters and watch the motion, the position–velocity phase portrait, and the time series move together.

Motion

horizontal spring–mass
Playback
show forces
t = 0.00
Parameters m, b, k
ODE
Initial condition x(0), x′(0)
Solution
Signatures
natural frequency—
damping ratio—
eigenvalues—
period—
—
Parameter presets