Spring Motion Applet

This applet calculates and animates the position of a spring in motion.

Size:LargerLargeDefault
(Resolution)(1150 x 800)(1000 x 700)(850 x 600)

If your browser is having problems displaying this applet, make sure you have the latest version of Java installed on your computer.

History

This spring motion applet was created by student Malcolm Kotok, as part of an interdisciplinary directed study, under the guidance of professors Aaron Heap (Mathematics) and Doug Baldwin (Computer Science) at SUNY Geneseo. The ultimate goal of the directed study was to create an applet that illustrates the motion of a spring, modeled by a second-order differential equation known as the Model of Harmonic Motion:
m x'' + d x' + k x = f(t)

If an object of mass m > 0 is attached to a spring and set in motion, its vertical position x(t) at any time t is affected by several forces. In addition to gravity, there is the spring force, damping force (such as air resistance), and a possible external force. Controlling these forces are the spring constant k > 0, the damping constant d ≥ 0, and an external forcing function f(t).

The original version of the program (found here) did not allow for an external forcing term, which led to a homogeneous differential equation that is easily solved. That applet had an extra feature of actually providing the solution to the differential equation, which would be a function representing the position of the object hanging from the spring as time goes by. The current version does not provide an explicit formula for the solution to the differential equation, but does provide a graph of the solution.

To use the applet, simply input the constants m > 0, d ≥ 0, and k > 0. You may also input almost any type of function (using t as a variable) in the text box on the right-hand side of the differential equation. You can also change the initial conditions t0, x0, and v0 or the window size for the graph. After inputting the values you want to use, hit the 'SOLVE' button to plot the solution and hit the 'Animate' button to set the spring in motion.