Spherical integrals

For basic info on how to calculate integrals, see Integration primer. Just as we can integrate over a number line, we should be able to integrate over the surface of a unit sphere. To do so, we can use spherical coordinates.

SphericalCoordinates.png

A naive approach would be a double integral like so:

We know that the surface area of a sphere is , so for a unit sphere, . #

Let's try integrating the constant over the unit sphere using this naive approach. This should give us the surface area of the sphere.

That is definitely not ! It turns out we are missing a correction factor for the curvature of a sphere. When we integrate over a sphere, our differential is an infinitely small quadrilateral surface patch on the sphere surface.

SphericalIntegration.png

Notice how the top and bottom edge of the differential surface patch are different lengths! We need to account for the shape of the differential, otherwise we are just integrating over a perfectly rectangular plane! The height of the quadrilateral is , but the width is . Notice how the sine term makes the width small when theta is close to one of the poles.

We can revisit our naive method, and add the correction factor of :

And now we get the correct surface area of the unit sphere, , so this method of spherical integration works.

We can turn the spherical integral into a hemispherical one by changing range of integration for to :

The rendering equation contains a hemispherical integral:
Where denotes a unit hemisphere of directions. Why does this look different from what we've seen, and what exactly is ?

The formulation of the rendering equation shown earlier looks different because it is integrating over Solid Angle domain. The relationship between differential solid angle and differential spherical coordinates is:

Thus:

A final note on spherical integrals: Why use this alternate integration domain and not just spherical coordinates?

Essentially, this is just because it makes the math much nicer. There is nothing stopping us from writing the rendering equation out with a parameterization using spherical coordinates. You can think of as roughly representing a ray direction. See Solid angle for more info on solid angles.

#light-transport #math