The canvas shows a vibrating string stretched between two endpoints. The wave motion runs slowly enough to watch a pulse travel from one end to the other, bounce off the boundary, and come back. (You can slow it down even further by opening the Physics tab at the bottom of the canvas.) The sound you hear is the same vibration at a much higher speed — audible pitch rather than visual motion.
Click and quickly release on the string body. This delivers a velocity impulse at the click point — a short, sharp hit, like tapping a guitar string with your finger. The shape of the impulse determines which modes get excited: striking near the middle favors the fundamental and odd harmonics; striking near a quarter-point brings out the even ones. The physics menu contains a slider which will increase the width of the "hammer".
Click on the string and hold for a moment, then drag up or down. You'll see the string deform into a triangle with the peak at your grab point. Release to let it go. The triangular shape decomposes into a set of sinusoidal modes, each of which then oscillates and decays independently. You can hear the difference between a pluck near the middle (rounder, dominated by the fundamental) and a pluck near the end (brighter, more upper harmonics).
Click near either endpoint to toggle its boundary condition between fixed (pinned, shown as a filled dot) and free (open, shown as a ring). A fixed end reflects waves with inverted polarity. A free end reflects without inversion. Try switching one end to free and plucking — the pitch drops to half, because the fundamental mode shape changes from a half-wave to a quarter-wave.
Use the SCENE button in the sidebar to load Solo (1 string), Quintet (5 strings), or Full Spread (9 strings). In multi-string mode, the STRUM button activates the strum tool — sweep the mouse vertically to excite each string as you cross it, like drawing a bow across strings.
The speed slider controls how fast the simulation runs. Slow it down to watch a pulse travel in detail. The damping slider controls how quickly oscillations decay — high damping absorbs energy quickly; zero damping lets the string ring indefinitely. The slope slider adds extra damping to higher modes, mimicking the way real strings lose high-frequency energy faster than low.
The physics menu contains a checkbox for "Fourier Analysis". Check this box to see the individual sine waves which are used to sum up to the string wave that we see. These fourier sine waves represent harmonic mode shapes which contribute differently depending on where the string was plucked or struck.
The string is solved analytically and assumes a small angle approximation. You might notice that the string behaves strangely if it it recieves a large displacement. The small angle approximation does not account for nonlinear effects or curvature of the string which exists in the physical world. Mode shapes are sin(n * pi * x / L) and frequencies are n * pi * c / L, where c is the wave speed. The visual physics runs at a slow wave speed (roughly 2 m/s, so a pulse takes about half a second to cross the string). Sound runs independently via Karplus-Strong synthesis at audible pitch. Both represent the same physical phenomenon at different timescales. When you pluck, the triangular displacement is projected into the modal basis via the orthogonality of the sine functions; the resulting modal amplitudes decay exponentially, each at its own rate depending on its natural frequency.