Spherical Harmonics Examples

These short examples compute various spherical harmonic functions. There's some nasty code-pasting in the scatter example, but it successfully computes Mie scattering coefficients.
legendre.cpp Computes the Legendre Polynomial P upper (1) lower n at z; via the Pi lower n / Tau lower n recursion. The two are related by: P_n(z) = sin(acos(z)) * Pi_n (z) d P_n(z) /dz = Tau_n (z)
ricatti_bessel.cpp Computes the Ricatti-Bessel function Psi_n(z). This function is used in, for example, various spherical harmonics applications.
scatter_mie.cpp Computes so-called "Mie scattering" for a homogenous sphere of arbitrary size illuminated by coherent harmonic radiation.
scatter_mie_real.cpp Computes so-called "Mie scattering" for a homogenous sphere of arbitrary size illuminated by coherent harmonic radiation.
Created by Orion Sky Lawlor, olawlor@acm.org, 2005-04-27
Placed in the public domain (download)
Back to
My Home Page