Spherical Harmonics: Difference between revisions

Line 54: Line 54:
\end{cases}</math>
\end{cases}</math>


===Visualizations===
==Properties==
Copied from Green<ref name="stupidsh">Robin Green (2003). ''Spherical Harmonic Lighting'' URL: [http://silviojemma.com/public/papers/lighting/spherical-harmonic-lighting.pdf http://silviojemma.com/public/papers/lighting/spherical-harmonic-lighting.pdf]</ref>
 
* Orthonormal
* Rotationally Invariant
* Integration of two spherical harmonic functions is a dot product of their coefficients
{{hidden | Proof|
This follows from being orthonormal:<br>
<math>
\begin{align}
\int_{S}\tilde{L}(s)\tilde{t}(s)ds &= \int_{S}\left(\sum_i L_i y_i(s)\right)\left(\sum_j t_j y_j(s)\right)ds \\
&= \sum_i\sum_j L_i t_j \int_{S} y_i(s) y_j(s)ds \\
&= \sum_i^{n^2} L_i t_i \int_{S}( y_i(s) y_i(s))ds\\
&\qquad\text{ because orthogonal}\\
&= \sum_i^{n^2} L_i t_i\\
&\qquad\text{ because orthonormal}
\end{align}
</math>
}}
 
==Visualizations==
Below are distorted sphere visualizations where the radius corresponds to the value at each point.
Below are distorted sphere visualizations where the radius corresponds to the value at each point.
* [https://www.shadertoy.com/view/lsfXWH iq's 0-3]
* [https://www.shadertoy.com/view/lsfXWH iq's 0-3]