The motion of sound waves in a compressible medium is described by the wave equation
where c designates the speed of sound in the medium. For sound waves that depend on a single spatial variable, the Laplacian operator is
where n is the dimension of the spatial symmetry determining the geometry of the sound waves, and the same variable r is used across different dimensionalities for convenience.
Sound waves whose geometry is determined by a single dimension, plane waves, obey the wave equation
If the partial differential operator in this equation is factored
then one can see that the first factor annihilates any function with an argument of
Each of these arbitrary functions satisfies the differential equation on its own, independent of the other.
Visualizations in this presentation will represent sound waves of a single frequency, called oddly enough monochromatic waves, which are described by sines and cosines. Since the argument of a circular function must be dimensionless, the monochromatic solution for plane waves will be taken to be
where ω is the frequency and
div element where the visualization appears so that it is relatively close to its statement in mathematical notation.
Now for the fun! Start with a plane wave moving on a two-dimensional lattice of atoms:
The magic of Three.js is that it takes only a little more code to show the same motion in three dimensions. Here is a plane wave moving on a three-dimensional lattice of atoms:
The graphic can be rotated in any direction by left clicking and dragging the cursor. Zooming in and out is done with a mouse wheel or the usual pinching motion on a touchpad or touchscreen. The graphic can also be panned by right clicking and dragging, or reset by reloading the page. Rotation and panning have been explicitly disabled for two-dimensional graphics.
Regular lattices have been shown first to help make clear that the atoms themselves vibrate about their initial positions and do not move with the wave. The same applies to a random distribution of components of the medium, as for example air molecules. Here is a plane wave moving through a two-dimensional random distribution of molecules,
and here is a plane wave moving through a three-dimensional random distribution of molecules:
Sound waves whose geometry is determined by two dimensions, cylindrical waves, are considerably more mathematically complicated that plane waves. They obey the wave equation
This wave equation does not have a simple general solution, and particular solutions have a logarithmic singularity at the origin arising from the symmetry of the system. To avoid these complications, first make the substitution , under which the equation becomes
If the function is limited in value, then the middle term in this equation becomes progressively smaller moving outward from the origin. Far from the origin one can make the approximation
which is the wave equation for plane waves. Cylindrical waves have an approximate general solution, expressed in terms of arbitrary functions, of
The monochromatic solution for cylindrical sound waves will be taken to be
The amplitude at the origin has been exaggerated to compensate for the radial weakening of the wave. Here is a cylindrical wave moving on a three-dimensional lattice of atoms:
Rotate this graphic to either side to see the wave emanating from the axis of symmetry.
As before regular lattices are shown first to emphasize that the components of the medium do not move with the wave. Now here is a cylindrical wave moving through a two-dimensional random distribution of molecules,
and here is a cylindrical wave moving through a three-dimensional random distribution of molecules:
Sound waves whose geometry is determined by three dimensions, spherical waves, are much simpler to describe than cylindrical waves. They obey the wave equation
With the substitution this equation becomes
which is the same equation as for plane waves. The general solution to the original equation, expressed in terms of arbitrary functions, is thus
Another way to justify this solution is to note that the spatial part of the differential operator in the equation can be factored into a squared operator