Skip to content

Interactive STEM simulation

Simple Harmonic Motion Lab — Mass-Spring Simulator

Simulate simple harmonic motion online: underdamped, critically damped, overdamped, and resonance. Adjust mass, spring constant, damping, and driving force. Export CSV data.

🌀
SHM MASS-SPRING LAB
PARAMETERS
kg
N/m
N·s/m
m
m/s
N
Hz
Show force vectors
PHYSICS
Status
UNDERDAMPED
Natural Freq
0.712 Hz
Damping Ratio ζ
0.056
Energy
KE:0.0000 J
PE:2.5000 J
Total:2.5000 J
FPS: 60

Community Feedback
0 Comments

Share Your Experience

Loading comments...

Simple Harmonic Motion Lab — Mass-Spring Simulator

This SHM lab animates a horizontal mass-spring system with realistic coil drawing. The mass glows from blue (high PE) to red (high KE) based on instantaneous energy ratio, and an energy bar is shown at the base of the canvas. Set mass, spring constant, and damping coefficient to explore underdamped, critically damped, and overdamped regimes. Add an external driving force with adjustable amplitude and frequency to study resonance. A graph panel below shows position, velocity, energy, or phase-space plots over time, and data can be exported as CSV.

What you can do in this simulation

  • Adjust mass (kg), spring constant k (N/m), and damping b (N·s/m)
  • Set initial displacement and velocity as separate initial conditions
  • Add external driving force with amplitude (N) and frequency (Hz)
  • Switch graph between x(t), v(t), energy, and phase-space views
  • Export time-series data as a CSV file

Concepts covered

simple harmonic motion · damped oscillation · resonance · natural frequency · damping ratio · phase space

Related simulations

Browse all Physics simulations →

Related reading

Free to use in your browser — no signup required. Found a bug or have an idea to make it better? Tell us.

Finished experimenting?

Save one completion to this browser's signed guest ledger, or directly to your account when signed in.