A weight on a spring, with a pen that draws its movement on a turning drum. Physiology labs used machines like this, called kymographs. The bounce comes from --spring(t, cycles, decay), which works out a damped oscillation. The weight calls it for where it is now, and each of the 120 pieces of the line calls it for its two ends, so the drawing always matches the weight.