Spherical harmonics are an infinite set of orthonormal basis functions defined on the imot sphere. It is analogous to Fourier series in 1D.

spherical harmonics.png

In the above graph, blue portions represent regions where the function is positive, and yellow portions represent regions where it is negative.

Spherical harmonics are of particular interest in computer graphics, as functions taking a unit vector as input can be viewed as a function on the sphere. Those functions, no matter how complicated, can be expressed as an infinite weighted sum of spherical harmonic functions, and can be approximated with finite terms.

Degree and Order

SH functions are split into numbered groups often called “frequency bands” (with degree ). The band with degree contains functions, typically indexed from , and the index is called “order” of the function 1.

A spherical harmonic function with degree and order is usually denoted like . It is typically a function in spherical coordinates .

Info

Note that this note uses the physics convention of spherical coordinates

The function has a complicated definition, but each term can be found in various lookup tables online. Note that there are both complex number version and a real-valued version . In computer graphics, we typically care about the real-valued version.

Obtaining the Spherical Harmonic Coefficients

We can represent real-valued function in term of spherical harmonics:

where are the real-valued spherical harmonic functions. Now the question is how to find those coefficients .

Finding coefficients of spherical harmonic is analogous to finding coefficients of basis vectors to represent a geometric vector. With geometric vectors, we use dot product to find the magnitude of a vector projected to a basis. With spherical harmonic, we find coefficients by computing inner product of functions: 1

Footnotes

  1. Introduction to Spherical Harmonics for Graphics Programmers 2