Download ModelDownload SourceembedLaunch WebsiteLaunch Website 2



Mass on a Spring: Motion in a Vertical Plane

A mass m is situated at the end of a spring of (unstretched) length L0 and negligible mass. The spring is fixed at the other end and the motion is restricted to two spatial dimensions in a vertical plane, with the y-axis representing the vertical (if gravity is switched on).

We use Hooke's law (with spring constant k) for the spring force, and include a damping term that is proportional to the velocity of the mass. You can also choose for the spring to behave like a spring only when stretched, and have no effect when compressed (i.e. it is more like a string).

Applying Newton's Second Law yields a second-order ordinary differential equation, which we solve numerically in the simulation and visualise the results.



  1. Drag the red mass to impart an initial velocity, and see how the system evolves.
  2. Try changing the initial vertical position of the mass relative to the fixed end of the spring using the slider.
  3. Observe what happens when gravity is switched off.
  4. Try varying the spring constant relative to the force of gravity and/or the damping coefficient, using the sliders. You may need to fiddle with the damping coefficient to better approximate energy conservation.
  5. Also try activating the "string-like" mode such that the elastic force only occurs in the stretched state and not in the compressed state.


Code Language Translator Run

Software Requirements


Android iOS Windows MacOS
with best with Chrome Chrome Chrome Chrome
support full-screen? Yes. Chrome/Opera No. Firefox/ Samsung Internet Not yet Yes Yes
cannot work on some mobile browser that don't understand JavaScript such as.....
cannot work on Internet Explorer 9 and below



Wolfgang Christian; Francisco Esquembre; Zhiming Darren TAN

Sample Learning Goals


For Teachers








Other Resources


end faq

{accordionfaq faqid=accordion4 faqclass="lightnessfaq defaulticon headerbackground headerborder contentbackground contentborder round5"}

1 1 1 1 1 1 1 1 1 1 Rating 0.00 (0 Votes)