Cymatics
Scatter sand on a thin metal plate, bow its edge, and the sand runs off the parts that move and gathers on the lines that don't. Ernst Chladni drew these figures in 1787; they are the nodal lines of the plate's vibration, made visible. Cymatics is a sketchbook for the algorithms behind them: a driven plate, the sand that settles on it, and the standing waves on a shaken layer of fluid.
Pick a plate shape (square, disc, annulus, triangle, hexagon, ellipse, stadium, guitar or violin) with a free or fixed edge, and drag the frequency. Drag on the plate to move the driver; click the spectrum to tune to one of its peaks, or press Resonance to snap to the nearest one. Sweep glides upward through the whole range. Pure modes sets the driver aside and lets you add two modes by hand, which is how Chladni's ± figures are made. Tone plays the drive frequency, and Listen lets a whistle or a voice drive the plate.
Modes
A plate has a family of shapes in which it is happy to vibrate, its modes, each with its own frequency. Because a plate resists bending, frequency rises with the square of the wavenumber. The square uses separable cosines (free edge) or sines (fixed edge); the disc uses Bessel functions, with the wavenumbers taken from the roots of J_m or of its derivative.
square φ = cos(nπu) · cos(mπv) f ∝ √(Dx/Dy) · n² + m² / √(Dx/Dy)
disc φ = J_m(λ r) · cos(mθ) f ∝ λ²
These are the idealised, separable modes — the true free-plate modes are not separable — but they carry the same nodal families. Stiffness Dx/Dy imitates a grained plate, like the spruce top of a violin, and splits the pairs of modes that a perfectly square plate shares.
Shape
The outline decides which modes can exist, so it decides the figure. Its symmetry becomes the pattern's symmetry: a square's four-fold, a triangle's three-fold, a hexagon's six-fold. Wherever a symmetry maps one mode onto a different one, the two share a frequency, and a driver can mix them, which is where the square's diagonals come from. The edge matters as much as the outline: a fixed edge is always a node, so sand lines the rim, while a free edge swings and the sand runs up to it.
Five shapes have exact modes, computed in the browser:
annulus φ = [Y_m′(ka) J_m(kr) − J_m′(ka) Y_m(kr)] · cos(mθ)
triangle φ = Σ_w ε(w) cos((w k)·x) six plane waves, folded by the mirrors (Lamé, 1833)
ellipse φ = R(ξ) · ce_n(η, q) Mathieu functions, q = k²c²/4
The annulus mixes both kinds of Bessel function so that the free hole has no slope across it; its rings sit further out than the disc's. Lamé's triangle is a sum of plane waves reflected back and forth by its three edges. The ellipse separates in elliptic coordinates, and its nodal lines are confocal ellipses and hyperbolas.
The hexagon, the stadium and the two instrument tops have no closed form. Their modes are solved once, offline, by finite elements (tools/cymatics_modes.py), and fetched when the shape is chosen. The stadium, a rectangle with round ends, is a chaotic billiard: a ray bouncing inside it never settles into a pattern, and its higher modes look disordered, some scarred along the few periodic orbits. The guitar top keeps its sound hole and is driven at the bridge; the violin top is shown before its f-holes are cut, driven at one foot of the bridge. A fixed edge is roughly the top glued to its ribs; a free edge is the bare plate a maker taps and tunes. These outlines take their proportions from the instruments, not from any one maker's pattern.
The driven response
A point driver excites every mode at once. The steady-state shape is a damped sum over all of them, the plate's Green's function:
w(x) = Σ φ_k(x) φ_k(x₀) / (f_k² − f² + iγ f f_k)
Near a resonance one term dominates; between resonances its neighbours mix, which is why the figures morph rather than switch. Move the driver onto a node of a mode and that mode drops out of the sum. A grain of sand only leaves the plate where the plate's acceleration beats gravity; there it hops, in proportion to the excess, and drifts down the amplitude gradient. Where the plate is too quiet to throw it, it stays put, apart from a faint shiver, since the plate under it is never perfectly still. The grains are sized like beach sand, mostly fine with a few coarse ones, and the coarse ones are thrown less far. So the antinodes empty, and every grain that lands in the quiet band around a nodal line stays there, which is what draws the line. Agitation is the drive level: more of it narrows the band. When two nearly degenerate modes ring out of phase, |w| vanishes only at points, and the sand gathers in islands instead of lines.
Faraday waves
Shake a shallow dish of liquid up and down and, past a threshold, its surface breaks into a standing pattern that oscillates at half the drive frequency. The wavelength comes from the dispersion relation for capillary-gravity waves, solved here by bisection:
(2π · f/2)² = (g k + σ k³ / ρ) · tanh(k h)
The surface is drawn as a sum of standing plane waves at evenly spaced angles: two give squares, three give hexagons, and four to six give the quasicrystalline patterns that appear under two-frequency forcing.
Plain HTML5 canvas and vanilla JavaScript, built as a handful of web components (<cymatics-plate>, <cymatics-spectrum>, <text-switch>, <theme-switch>), with no libraries. It follows the site's light and dark themes, or the system setting.
References
- Chladni, E. F. F. (1787). Entdeckungen über die Theorie des Klanges. Leipzig.
- Faraday, M. (1831). On a peculiar class of acoustical figures. Philosophical Transactions of the Royal Society 121, 299–340.
- Tuan, P. H., et al. (2015). Exploring the resonant vibration of thin plates: Reconstruction of Chladni patterns and determination of resonant wave numbers. J. Acoust. Soc. Am. 137, 2113.
- Edwards, W. S., & Fauve, S. (1994). Patterns and quasi-patterns in the Faraday experiment. J. Fluid Mech. 278, 123–148.
- Leissa, A. W. (1969). Vibration of Plates. NASA SP-160.
- Lamé, G. (1833). Mémoire sur la propagation de la chaleur dans les polyèdres. Journal de l'École Polytechnique 22, 194–251.
- McCartin, B. J. (2003). Eigenstructure of the equilateral triangle, Part I: The Dirichlet problem. SIAM Review 45, 267–287.
- Mathieu, É. (1868). Mémoire sur le mouvement vibratoire d'une membrane de forme elliptique. Journal de Mathématiques Pures et Appliquées 13, 137–203.
- Bunimovich, L. A. (1979). On the ergodic properties of nowhere dispersing billiards. Communications in Mathematical Physics 65, 295–312.
- Heller, E. J. (1984). Bound-state eigenfunctions of classically chaotic Hamiltonian systems: scars of periodic orbits. Physical Review Letters 53, 1515–1518.
- Hutchins, C. M. (1981). The acoustics of violin plates. Scientific American 245(4), 170–186.