This plots position (vertical) as a function of time (horizontal) for an object subject to a Hooke's Law restoring force.
Suppose that the object is also subject to a force that always acts opposite the velocity, v, and is proportional to the magnitude of v. If the constant of proportionality is denoted R, then this damping force is -Rv. Modify the applet to display the motion of the object by doing the following:
1. Create a new input for R. Give R an initial value of 0.
2. Modify the equation for the object's y-acceleration to include a term that accounts for the damping.
3. Run the applet. Make sure it still runs correctly for the undamped case, R = 0.
4. Investigate the motion for different values of R (say 1, 5, 10, 20).