Sand-colored nodal lines on a virtual plate. Click or tap to advance through mode pairs (m, n). The pattern morphs between states with a cubic ease.
In 1787, Ernst Chladni sprinkled sand on a metal plate and drew a violin bow along its edge. The plate vibrated. The sand migrated to the stillest lines and stayed there, tracing shapes that looked designed. They weren't. They were zeros of a wave equation, visible only because sand is lazy and rolls downhill into silence.
Napoleon watched Chladni perform this at the French Academy in 1808 and offered a kilogram of gold to whoever could explain the mathematics. Sophie Germain took up the challenge. Her elasticity theory, refined over several attempts and later corrected by Kirchhoff, gave the first rigorous account of how thin plates vibrate. The patterns Chladni found by ear, Germain described with partial differential equations.
The simulation here skips the full plate dynamics and computes the idealized nodal field directly. For a square plate with mode integers m and n, the displacement at any point (x, y) follows this expression:
// Chladni field: nodal lines where |f| ≈ 0
const f = Math.cos(m * PI * x) * Math.cos(n * PI * y)
- Math.cos(n * PI * x) * Math.cos(m * PI * y);
const af = Math.abs(f);
if (af < band) {
const s = 1 - af / band, s2 = s * s;
buf[i] = BR + (SR - BR) * s2; // sand red
buf[i+1] = BG + (SG - BG) * s2; // sand green
buf[i+2] = BB + (SB - BB) * s2; // sand blue
} else {
buf[i] = BR; buf[i+1] = BG; buf[i+2] = BB; // dark plate
}
The function evaluates to zero along nodal lines. Pixels near zero get sand color; everything else stays dark. That band threshold (0.115) controls line width. The quadratic falloff (s * s) gives the sand a soft, granular glow rather than a hard edge.
Swapping m and n in the cosine products flips which axis contributes which frequency. The subtraction means the pattern vanishes along any line where both terms cancel. Increase m and n together and the plate fills with finer geometry: more nodal lines, tighter intersections, richer symmetry. The twelve preset modes cycle through pairs like (1,2), (2,3), (3,5), each morphing into the next by interpolating the mode integers through a cubic ease function. The result is smooth, organic transitions between patterns that look nothing alike.
Chladni's original experiment required a bow, a plate, and patience. This version requires a cosine, a threshold, and a for loop. The physics stays the same. Sand collects at zeros. The rest is rendering.
← Back to showcase