Animate
When you play the animation, the block oscillates horizontally about the origin on a frictionless table. The origin is in the center, the direction of +x is to the right, and the grid spacing is 0.02 m. The oscillation is the result of a Hooke's Law force applied by the spring to the block. The heights of the vertical bars shown below the table are proportional to the values of kinetic and elastic potential energy of the block-spring system.