Hear the Shape of a Drum

Strike a drum and a network that has never seen it draws the shape it hears.

Tuning up…

Sand figures

Click the drum to strike it. Drag to draw a new one.

Can you hear it?

One of these four drums is about to play. Listen, then pick the one you think it was. The network hears the same sound and answers too, though it has never seen any of them.

You
0 of 0
The network
0 of 0

Two drums, one sound

In 1966 Mark Kac asked whether you could hear the shape of a drum: whether its notes pin down its outline. In 1992 Carolyn Gordon, David Webb and Scott Wolpert showed that you can't. These two drums are each seven half-squares glued together in different ways, and they ring at exactly the same frequencies.

Working out both drums’ notes…

Play one note on both, and watch the sand:
Lowest notes, as multiples of the first
NoteLeft drumRight drum
The network hears the same notes from both, so it has to draw the same shape for both.

How it works

A drumhead is a membrane held at its rim. It can only vibrate in certain patterns, its modes, and each mode has its own frequency. A strike sets many of them going at once, and what you hear is their sum. The outline decides the modes, so it decides the sound. Mark Kac asked in 1966 whether that works backwards too: whether the frequencies alone pin down the outline.

Finding a drum’s notes

The page computes the modes with finite elements. It scales the drum to unit area, covers it with a mesh of about 2,000 points, and solves for the 40 lowest modes. That takes about a tenth of a second in your browser. The size of the drum and the tightness of the head move every note up or down together, so what carries the shape is the notes’ ratios to the lowest one. Those ratios are all the network gets.

The listener

The network was trained on about 490,000 drums: one-stroke doodles from Google’s Quick, Draw! dataset, stretched copies of them, random blobs, stars, polygons and ellipses. For each, the same solver found its 40 lowest notes. The network reads the ratios of the first few, from 3 up to 40, and draws four candidate outlines, each with how sure it is. The notes can’t tell which way a drum is turned, whether it’s mirrored, or where you started drawing it, so training lines each candidate up with the true outline in all those ways before scoring it. The page does the same before it measures the overlap.

How well it hears

On 1,000 drums the network never trained on, mostly doodles, here is how much its most confident outline overlaps the real one, after the best turn and mirror:

Overlap of the network’s outline with the true drum (area in common over total area)
Notes heardAll test drumsDoodles
372%68%
575%71%
1078%74%
2079%75%
4079%76%
Always guessing a circle57%

With 40 notes, ellipses come back at 96% overlap, polygons and pointed stars at 95%, smooth random shapes at 90–93%, and doodles at 76%. Most of what the network can hear, it hears in the first ten notes. In the quiz above it picks the right drum out of four about three times in four (76% over 300 practice rounds), where guessing would manage one in four.

Where hearing runs out

Some of a drum’s shape is easy to hear. The way the notes crowd together as they rise gives away its area, its perimeter and even how many holes it has. Fine detail lives in high notes, though, and 40 notes only reach so far, so long thin limbs and sharp notches come back blunted. And as Gordon, Webb and Wolpert showed, some different drums have exactly the same notes, so no listener could ever tell them apart. A mirror image always sounds the same as the original.

The sand

In 1787 Ernst Chladni scattered sand on a metal plate and bowed its edge. The sand bounced off the parts that moved and piled up on the lines that stayed still. Pick a sand figure under the drum to try it here: each grain takes small random hops, bigger where the drumhead moves more, so the grains wander until they come to rest on the nodal lines. Switch notes and the same sand moves on to the new lines.

Credits

M. Kac, Can one hear the shape of a drum?, American Mathematical Monthly (1966). C. Gordon, D. Webb and S. Wolpert, One cannot hear the shape of a drum, Bulletin of the AMS (1992). The drums’ coordinates follow T. Driscoll, Eigenmodes of isospectral drums, SIAM Review (1997), as used in Cleve Moler’s 2012 posts. Doodles from Google’s Quick, Draw! dataset (CC BY 4.0). Meshing by Mapbox’s Delaunator (ISC). Colours sampled from a Wikimedia Commons photograph of a Chladni plate.