November 27, 2026

Chladni Plates Simulation: 42,000 Sand Grains in a Single HTML File

Round brass-edged metal plate with sand in a star-shaped nodal pattern, top-down

Chladni Plates is a browser simulation of sand on a vibrating plate, written as one HTML file with no libraries. It draws about 42,000 grains, a phase glow and a brass-edged plate on three stacked canvases.

The tool comes from x9m8, a site run by the same owner as Marcellino NY. The physics is old: APS News dates the first such experiment to Robert Hooke on July 8, 1680, and Ernst Chladni made it systematic in the late 18th century.

The simulation has a full screen button, and it lives at apps.x9m8.com/chladni-plates.

The pattern is a formula

On a real plate the pattern follows plate theory. The Matemateca notes that Sophie Germain modeled it with a fourth-order partial differential equation after Napoleon backed a prize, and that Kirchhoff later refined the boundary conditions. The app does not solve that. It uses a simple idealized stand-in for a square plate: cos(nπx)cos(mπy) − cos(mπx)cos(nπy).

Where that expression equals zero, the plate is still. Those curves are the nodal lines, and two integers, n and m, pick the pattern.

Lab bench with a function generator and a speaker driver under a square metal plate dusted with sand

Grains that settle by themselves

The Irish Times describes grains bouncing away from the strongly moving parts and collecting where the vibration is least. The code copies that rule directly. Each grain takes a random step each frame, and the step size scales with the absolute value of the formula at the grain’s position. Fast-moving regions throw grains around, and still lines hold them.

No grain is told where to go. Over a few seconds 42,000 independent random walks pile up along the curve.

Macro of sand grains lined along a thin curved line on dark brushed metal

Rendering

Three canvases are stacked. The bottom one holds the plate, drawn once, with brushed grain, a brass rim and screws. The middle one is a low-resolution phase field, scaled up with smoothing, that tints the two halves of the plate amber and blue. The top one is the sand, written as raw pixels into a 32-bit array and pushed to the screen once per frame.

Changing the mode cross-fades the old and new formulas over about 1.3 seconds and briefly raises the shaking strength, so the sand scatters and re-settles.

Sound and state

A sine oscillator from the Web Audio API plays a pitch that rises with n² + m². The scale is illustrative; real plates have their own mode frequencies, and the app says so on screen. The chosen mode is written to the address bar as ?n=3&m=5, so a link carries one specific pattern.

Laptop showing a dark-themed sand-on-plate physics simulation with sliders

Limits

  • The formula models an idealized square plate, not a measured one.
  • Sand is a random walk, not a granular physics engine; grains do not collide.
  • The pitch is an illustration, not a measured resonance.

Sources

503 Posts

Peter Kalafatis writes and edits X9M8. He holds a bachelor's degree from LIU Post and a master's in Media Studies from The New School, with academic work in the philosophy of science, human behavior, AI, and memetics.

View All Posts

Leave a Reply

Your email address will not be published. Required fields are marked *