Motion of a Block Attached to a Spring

This simulation models the motion of a block attached to an ideal spring. The block can oscillate back-and-forth horizontally. You can change the mass of the block, the spring constant of the spring, and the initial position of the block. You can then see the resulting motion of the block, as well as see bar graphs of the energy and plots of the block's position, speed, and acceleration as a function of time.