Extras

Spherical Harmonics Explorer

Real spherical harmonics in ACN order, SN3D normalization — the 3D generalization of the chapter-5 polar-pattern sandbox. Drag to orbit; play a tone and drag the source to hear the pattern.

Builds on Chapter 5 · Miking & Recording — polar patterns and directivity.

Ring vibrates the shape as a normal mode — each degree oscillates at √(ℓ(ℓ+1)); lobes breathe and flip sign. "Same shape, only rescaled" is exactly why spherical harmonics are the eigenfunctions of the sphere.

Coefficients

Presets

κ shapes the Sharp spot preset — a narrow highlight projected onto SH. Step the order up and watch it stay blurry, ringed by a halo: why splats cap near degree 3.

Order (Degree)

Display

Listen — Source Through the Pattern

gain +0.00

Dragging the source through the lobes and nulls sweeps the tone with the pattern's gain in that direction. A null falls silent; a negative (rear) lobe is a polarity flip at the same loudness.

Basis Functions

Rows = degree ℓ (color-coded). Columns = order m, from −ℓ (sine, sin mφ) through 0 (zonal) to +ℓ (cosine, cos mφ). Clicking or tapping a cell isolates that harmonic; clicking or tapping again restores the total. The sphere and balloon portraits share the main camera, so orbiting the big shape — or turning on Rotate — turns the whole table with it; Ring makes each row pulse at its own modal rate. The flat map is camera-independent.

What This Shows (Plain-Language Guide)

Spherical harmonics are a specialized topic, so this guide builds up slowly — what the 3D shape means, what each panel does, and then a set of short hands-on exercises that teach the ideas by doing. No prior Ambisonics background is assumed.

The Shape Is a Gain Map Over Direction

A spherical harmonic is simply a number attached to every possible direction — a gain map wrapped onto a sphere. The 3D form is the sum of the harmonics currently dialled in, g(Ω) = Σ cₙ·Yₙ(Ω): it states how loud a source in each direction would be. A microphone's omni, cardioid, and figure-8 patterns are the simplest cases of exactly this, so this explorer is the 3D generalization of the chapter-5 polar-pattern sandbox.

Degree (ℓ) and Order (m)

Every harmonic has two indices. Degree ℓ (the "level" — the control labelled 1 = FOA, 2 and up = HOA) sets how finely the pattern varies with direction: ℓ=0 is a plain sphere, and each higher degree adds finer lobes. Order m runs from −ℓ to +ℓ and selects which harmonic within that degree — negative m are the sine-type, positive m the cosine-type, and m=0 the axially-symmetric "zonal" one. There are (ℓ+1)² harmonics in total: 4 for FOA, then 9, 16, 25 with each step up.

ACN Order and SN3D Normalization

ACN (Ambisonic Channel Number) is just the agreed way to number the harmonics into one list — n = ℓ²+ℓ+m — so W, Y, Z, X, … always occupy the same slots. SN3D is the agreed way to normalize the basis functions, scaling them so that no harmonic peaks above the plain sphere (W). That is a statement about the basis, not a bound on the coefficients: an arbitrary expansion can have coefficients of any size, and the −1…1 range on the sliders here is a choice made by this interface. (An alternative scaling, N3D, gives each harmonic equal energy instead — the same shapes, rescaled.) Together, ACN and SN3D form the modern interchange convention.

Amplitude vs Power; Balloon vs Heatmap

Amplitude shows the signed gain — red where the pattern is positive, blue where it flips polarity (like the rear lobe of a figure-8). Power shows gain², always positive, which fattens the main lobe and hides the sidelobes — the "how focused is this beam" view. The balloon pushes the surface out in proportion to the gain (lobes literally protrude); the sphere heatmap keeps a fixed ball and paints the value onto it — clearer for busy high-order shapes that would otherwise fold through themselves.

Isolating a Basis, and the Color Code

Clicking or tapping any cell under Basis Functions isolates a single harmonic; clicking or tapping it again (or Show total field) restores the sum. While isolated, the shape is tinted that harmonic's degree color — the same hue used in the panels — so the level color code carries straight into the 3D view. (For the composite sum the colors convey sign or power instead, since a summed shape mixes every degree at once.)

The Basis Table

The pyramid under Basis Functions can draw each harmonic as a small portrait instead of a bare order number, which turns the panel into the classic tabulated picture of the basis. Sphere paints the value onto a fixed ball; Balloon pushes the radius out to |Y|, so the lobes protrude; Flat map unrolls the sphere into an azimuth × elevation rectangle — the whole function at once, with nothing hidden around the back, and the clearest view of how the table is organized: m=0 is horizontal bands, |m|=ℓ is vertical stripes, and everything between is a checkerboard that gains one more division per step toward the edge. Numbers restores the compact grid. The sphere and balloon portraits read the same camera as the main shape, so orbiting it — or turning on Rotate — turns the whole table with it, and Ring makes each row pulse at its own modal rate. All three follow the Amplitude / Power choice, so the legend under Display reads them too.

Rectangular vs Polar — and the Phase

For each order m>0 the cosine- and sine-type harmonics form a pair. Rectangular exposes them as two signed coefficients (the cos and sin amounts); Polar recombines them into a magnitude R = √(cos²+sin²) and an azimuth phase α. Adjusting α rotates that lobe family about the vertical axis by α ÷ m — the direct spherical analog of Fourier phase. (The zonal m=0 harmonic is axially symmetric, so it carries no phase.)

Hearing the Pattern

Under Listen, a tone is routed through a gain that tracks g(Ω) at the source direction. Dragging the source across the sphere sweeps that gain: main lobes are loud, nulls fall silent, and a rear lobe (negative gain) plays at the same loudness with inverted polarity — the audible counterpart of the visible shape.

Ringing the Sphere — the Eigenfunction View

Ring (beneath the graphic) sets the shape vibrating. Isolating a single harmonic first and turning it on shows the balloon breathing in and out without ever changing shape: it shrinks to nothing, then re-inflates with its colors flipped (red↔blue), like a struck bell holding one note. That "same shape, only rescaled" behavior is exactly what it means for a spherical harmonic to be an eigenfunction of the sphere's Laplacian — the curvature/smoothing operator hands the shape back unchanged, times a constant. With a mixture dialled in instead of a single harmonic, each degree rings at its own rate, proportional to √(ℓ(ℓ+1)) — higher degrees faster — so the shape shimmers, the way a struck object sounds all of its overtones at once. Rotate, beside it, simply spins the view for a clearer look at the lobes.

The Same Math, Three Ways

The sum g(Ω) = Σ cₙ·Yₙ(Ω) is a directional function, and the acoustics reading — gain versus direction — is only one of its uses. The identical basis carries (a) a microphone or beam's directivity in Ambisonics; (b) incoming light or irradiance over the sky, the "SH lighting" of computer graphics; and (c) the view-dependent color of a 3D Gaussian splat, where every blob stores spherical-harmonic coefficients per color channel (degree ≤ 3, 16 per channel) so its color shifts as the camera moves. The Radiance (splat) display makes that last reading concrete: three SH channels combine into an RGB color painted on the sphere. The ℓ=0 term is the flat base color; the higher degrees are the sheen. Orbiting the view — a mere change of viewpoint in the acoustic reading — is the actual physics here, since the color one faces is exactly what changes.

That third reading has since grown into a site of its own. The Gaussian Splat Explorer carries the same basis into computer graphics: a working splat renderer taken apart, where coefficients like the ones edited here become the view-dependent color of a blob, and the projection, sorting, and blending that turn a few thousand of them into a picture are shown as they happen rather than described. It also takes a capture of one's own — a trained scene, a point cloud, or a 360° panorama.

Why the Order Caps Out

Because the harmonics are band-limited, a truncated SH sum cannot reproduce a truly sharp feature. The Sharp spot preset projects a narrow highlight onto SH up to the current order; stepping the order up sharpens it only slowly and wraps it in a ringing halo (the spherical Gibbs effect — the blue rings in the signed-amplitude view). That ceiling is why splat color stops around degree 3. For crisp specular reflections, some methods store the color not in spherical harmonics but in spherical Gaussians — a different directional basis whose building block is a single tight lobe (not the 3D “Gaussian” blob itself, but a Gaussian bump on the sphere of directions). One lobe captures a sharp highlight that spherical harmonics would blur. (The Beam (panning) preset is the extreme case: the projection of an infinitely sharp point.)

Inside the Sphere, or Outside It

Every shape on this page is an angular function: it says how much, in which direction, and nothing about distance. A real sound field needs a radial factor as well, and which radial factor applies depends on where the sources are relative to the region of interest. That single choice separates the two ways acoustics uses this basis.

In the exterior problem the sources sit inside a sphere and the field is observed outside it. The radial factor is an outgoing spherical Hankel function, and the harmonics describe radiation: the directivity of a trumpet or a loudspeaker, measured on a surrounding ring of microphones and stored as coefficients so an auralizer can aim a source correctly. The monopole, dipole, and quadrupole of textbook acoustics are simply degrees 0, 1, and 2 of this expansion.

In the interior problem the sources are outside and the field is rebuilt in a region containing the origin. The radial factor is the spherical Bessel function, the one that stays finite at the centre, and the harmonics now describe capture: this is ambisonics. A first-order recording carries an omnidirectional component and three figure-of-eight components — degrees 0 and 1, which is to say the microphone patterns of Chapter 5 in three dimensions.

The same angular shapes serve both, which is why one page of pictures covers a radiating instrument and a recorded scene alike. Reciprocity closes the loop: a transducer’s directivity as a receiver is its directivity as a radiator, so the pattern does not care which way the sound is travelling.

📏

How big is the sweet spot? An interior expansion truncated at degree ℓ reconstructs the field faithfully only while kr ≲ ℓ, where k = 2πf / c is the wavenumber and r the radius of the listening region. Rearranged, the highest frequency that survives out to radius r is f ≈ ℓc / 2πr.

For a head-sized region — r ≈ 9 cm — that works out at roughly 600 Hz at first order, 1.8 kHz at third, and 4.2 kHz at seventh. Above that limit the reconstruction degrades first at the edges of the region and then at its centre, which is heard as a soft, unstable image rather than as an obvious fault.

This is the whole argument for higher order. Degree ℓ costs (ℓ + 1)2 channels — 4, 16, and 64 for the three cases above — and what the extra channels buy is not loudness or more directions but a larger region in which the field is right, or equivalently the same region correct to a higher frequency. A sweet spot is a volume, and order is the price of its radius.

Suggested Exercises

  1. Meet the omni and the dipole. Set Order to 1 (FOA) and click or tap Omni — a perfect sphere, equal gain in every direction. Then click or tap Figure-8 — two lobes separated by a silent ring where the gain crosses zero. Clicking or tapping the +1 cell in the degree-1 row isolates that same dipole on its own.
  2. Build a cardioid from two harmonics. Still at Order 1, click or tap Reset, then in Coefficients raise the ℓ=0 coefficient (the omni, W) to about 0.5 and the ℓ=1, m=+1 coefficient (X) to about 0.5. A heart-shaped cardioid forms — full gain forward, a single null directly behind. That omni-plus-dipole recipe is exactly how a cardioid microphone is built; the Cardioid preset produces the same shape.
  3. Hear a null. With the cardioid showing, press Play tone and drag Source azimuth slowly. The tone swells through the lobe and falls to silence right at the null; past it, toward the rear, it returns at the same loudness while the readout flags the polarity flip.
  4. Feel the phase. Set Order 3 and click or tap the +3 cell in the degree-3 row (a sectoral harmonic). Switch Coefficients to Polar and drag the φ slider: the whole lobe family rotates about the vertical axis. Switching back to Rectangular shows the same motion as a trade between the cosine and sine coefficients.
  5. Read the table. Under Basis Functions, click or tap Flat map and compare the columns at Order 4: the centre column (m=0) is horizontal bands only — no azimuth dependence at all, which is what zonal means — while the two outer columns (|m|=ℓ) are pure vertical stripes, the sectoral orange-slice harmonics. Everything between is a checkerboard, and the sine-type (−m) cell is its cosine-type (+m) partner shifted a quarter period sideways. Switching to Sphere or Balloon shows the same three families wrapped back onto the ball.
  6. Sharpen a beam with order. Click or tap Beam (panning), then step Order 1 → 2 → 3 → 4. The forward beam narrows as higher degrees join in — more harmonics buy finer directional focus, which is why higher-order Ambisonics localizes more sharply.
  7. Watch an eigenfunction ring. Isolate any single harmonic and turn on Ring: the shape breathes without deforming, its colors inverting as it passes through zero. Load a preset and Ring again — now the mixture shimmers, each degree at its own pitch. The Sphere heatmap display shows the same oscillation painted on a fixed globe.
  8. See a splat's view-dependent color. Switch the display to Radiance (splat) and click or tap Glossy: a soft white highlight sits on the colored sphere. Orbit, or turn on Rotate, and it slides across the surface — the same view-dependence a 3D-Gaussian-splat blob gets from its SH color coefficients. Matte (degree 0 only) has no highlight; Iridescent shifts hue with angle. The R / G / B tabs edit each channel's harmonics on their own. Set the Blob shape to Pancake or Needle to see the color on an oriented Gaussian ellipsoid rather than a sphere; the view color swatch shows the single tint the whole splat would show from the current camera.
  9. Watch SH lose a sharp highlight. Click or tap Sharp spot and push Highlight sharpness κ up. Step Order 1 → 4: the highlight sharpens only a little and stays wrapped in a blue ringing halo — a band-limited basis cannot draw a crisp point. That is why splat color caps near degree 3, and why sharp reflections switch to spherical Gaussians.

Sources & Inspiration