Simple Simulation

This is a simplified text-only version of the single spring simulation. You can click the start and stop buttons to pause the simulation. The numbers being reported are time t, horizontal position of the spring x, and velocity v.

(If you don't see the simulation try instructions for enabling Java.)


This version is intended for a student wanting to experiment with creating a simulation. The text-only output makes the code simpler. It would be fairly easy to put in a different simulation, by changing the differential equations being used. You can easily see how the Runge-Kutta algorithm is implemented in the code (see the solve method).

The source code is all in the single file SimpleSim.java. There are instructions in the file about how to compile and run the applet. The source code is covered by the GNU General Public License.

This applet can be used in a web browser or as a stand-alone Java application; see instructions in the SimpleSim.java file. The file SimpleSim-test.html is a test page for running the applet in a browser.
Valid HTML 4.01!