Vibrating String Simulation




The vibrating "string" above is composed of 64 segments, tied down at both ends. This simulation is based on an assignment in COS 496: Simulation of Systems, Real and Imagined, for which I was the TA during the spring '96 semester.

The "Run" and "Edit" buttons respectively start and stop the string's vibration. You can adjust the string's shape by dragging the mouse, whether the string is vibrating or not. Be careful with the nonlinearity control, since it tends to lead to instability and make the string go kerflooie.

For those interested in how this was done, vibration is simulated by solving the 1-d wave equation numerically in real time, assuming the string is tied down at both ends. Damping and nonlinearity are effected by some additional terms in the wave equation. The nonlinearity is the cubic term from the Fermi-Pasta-Ulam experiment.

Source code

More Java simulation

[menu imagemap]