Spherical Harmonics Applet: A tool for dynamically demonstrating spherical harmonic patterns. Click and drag the sliders with the left mouse button to control the patterns and use the middle and right buttons to pan and rotate the view.

Run with WebStart

Launch as a separate application.

Download Application

Right-click the icon for your operating system and choose 'Save target as...'


The best way to use this applet is to start with the Random Shape buttons and some of the items in the Examples menu. The items at the bottom of that menu are a range of visualisation settings that I thought added something to the shape.


Spherical Harmonics are really interesting as they can be used to reduce what is usually an inordinately expensive integration of the diffuse lighting environment into a series of much faster dot products. This is done by approximating the diffuse lighting environment, given as a complex luminous distribution over a sphere, with a matrix of Spherical Harmonics coefficients. Use this instead of the standard diffuse surface reflection model and very detailed and realistic diffuse lighting effects are possible to real-time. Robin Green explains it better and in much more detail in Spherical Harmonic Lighting: The Gritty Details.

The viewer itself was probably most inspired by Paul Bourke’s page on Spherical Harmonics, as well as the many supershapes viewers already written for Processing. Of course, with this one under my belt, a supershapes viewer of my own probably won’t be far away…


Wilhelm 6 June, 2011 - 11:12

Wow - I got it!

I have looked at spherical harmonics before, but I never really got it. As soon as I clicked on the luminosity map button some times, I finally understood and could see the color map and shape relationships.

Be careful though, I click too many times (maybe hundred or so) and the model turned entirely red. Refresh the page fixed it though.

Thanks for your great website, Wilhelm

Click here to comment on this page.