Anyone know a good explanation of what spherical harmonics are?
Just for fun... They are relatively easy to understand if you already understand Fourier transforms. In a Fourier transform you can write some (suitably well-behaved) function f(x) as a sum of a bunch of sinusoids of different frequencies: f(x) = a_0 + a_1 cos(x) + a_2 cos(2x) + ... + b_1 sin(x) + b_2 sin(2x) + ... Or more generally a sum over all real values, f(x) = ∫ a(k) cos(kx) + b(k) sin(kx) dk, since signals ca…
Spherical Harmonics
21–30 of 65 posts
Re: Spherical Harmonics
#22Anyone know a good explanation of what spherical harmonics are?
Now take this plate and turn it into a 3d sphere and that's spherical harmonica more or less. Electronsike to form them
Re: Spherical Harmonics
#23After the success of this method, there was a fairly long stretch of researchers looking for a better orthonormal basis (such as 2D Haar wavelents, as spherical harmonics is basically a Fourier Transform on a spherical basis). I think the pinnacle of this direction was Anisotropic Spherical Gaussians from 2013.
These days though, you'd at least use a neural net to learn a basis (or use a neural net to learn something else entirely). And of course, Gaussian Splats are the technique du jour for realtime relighting.
Re: Spherical Harmonics
#24They look too big. I expected all the l=1 to be like a cone near (0,0,0). And I expected one of them to be vertical instead of horizontal.
I'm not sure about the size but I think the shapes are correct. It's just very hard to examine them when they're rotating at such high speed. Compare them to the image on this page: https://en.m.wikipedia.org/wiki/Spherical_harmonics Suggestion to OP: this would be much more useful if you add a button to stop the rotation.
Re: Spherical Harmonics
#25Anyone know a good explanation of what spherical harmonics are?
A polynomial is a function like `f(x) = Ax^3 + Bx^2 + Cx^1 + Dx^0`
You can approximate most(all?) continuous functions using polynomials. The more "parts" (e.g. Bx^2 is one part) of the polynomial you have, the better you can represent a given function.
The previous example was a 1d function, but polynomials can be over any number of dimensions. E.g. a 3d polynomial `f(x, y, z)`.
Spherical harmonics are just a form of 3d polynomials, but with some special "parts" (called a basis function), with the amount of parts you have called a "band".
As for what they're good for, they're a fairly compact way of representing and filtering 3d signals.
In 3d rendering, they're really good at storing light hitting a point from different directions. You have an incoming ray of light on a unit sphere/hemisphere with origin x, y, z going towards the given point. You can then take your list of light rays with various (x,y,z) origins and (r,g,b) intensities, and then form a spherical harmonics approximation over it (basically a fitted 3d polynomial), which can be stored as just a few coefficients (A, B, C, D, etc...) using 1 or 2 bands, and cheaply computed (querying the light value r,g,b for a given ray) by plugging in the ray's x, y, z into the formula.
Besides being cheap to store and query, because you're only using 1-2 bands, you only capture the "low frequency" of the lighting signal, e.g. large changes in the light value get dropped, since it's just an approximation of the original signal. While this is normally bad, for 3d rendering, it's free denoising, giving you a smoother output image!
Re: Spherical Harmonics
#26Also lots of other cool research around SH in rendering, e.g. the recent ZH3 paper.
Re: Spherical Harmonics
#27Anyone know a good explanation of what spherical harmonics are?
Re: Spherical Harmonics
#28Anyone know a good explanation of what spherical harmonics are?
Re: Spherical Harmonics
#29Earlier quoted context omitted.
Yes. These are solutions of the Schrodinger equation for the electron in the hydrogen atom.
Aren’t the spherical harmonics functions with domain S^2, the sphere? I think the solutions to the (time-independent) Schrödinger equation for an electron in a hydrogen atom are given by like, a product of a function of distance from the center with one of the spherical harmonics, or something like that?
The spherical harmonics in general are typically derived as part of the solution to the Laplace equation in spherical coordinates. A bit of a semantic point (though perhaps the distinction is important) though, since the Laplace equation's angular dependence is identical to that of the Schrödinger equation for the hydrogen atom.
Re: Spherical Harmonics
#30Are these related to (or exactly) the distribution of electron orbits?