Read about

solid angles first.

Now that we have solid angles, we would like to be able to integrate over them. To make this clear, we again rely on our intuition from the 2D case.

Suppose we have a function, `f`(θ), which is defined over all directions in a plane. If we wanted to integrate this function over all directions in 2D, we would calculate:

∫ `f`(θ) `d`θ

Where the limits on the integral are from 0 to 2π. The quantity

`d`θ is called the

*differential planar angle*, or just

*differential angle* for short.

Suppose we have another function, `g`(**ω**), which is defined over all directions in 3D. The variable **ω** specifies a direction in 3D. We could think of **ω** as an unit-length 3-vector or a pair ^{1} (θ,φ) of scalar variables which express the direction in spherical coordinates.

We now want to integrate `g` over all directions:

∫ `g`(**ω**) `d`**ω**

The quantity

`d`**ω** is the

*differential solid angle* ^{2}. It's an infinitesimally small set of directions in 3D. To calculate

`d`**ω**, we remember that solid angle is the area of a spherical patch divided by the square of the radius of that sphere. We set up a sphere (of some radius

`r`), and calculate the

*differential area*,

`dA`,

subtended by the differential solid angle. And then we use

`d`**ω** = `dA` / `r` ^{2}

To calculate

`dA`, we express directions as (θ,φ) pairs, and recall our

calculus 101:

`dA` = (`r d`θ)(`r` sinθ`d`φ) = `r` ^{2}sinθ`d`θ`d`φ

Therefore we have that

`d`**ω** = sinθ`d`θ`d`φ

and our integral can be calculated as the double integral

∫∫ `g`(θ,φ) sinθ`d`θ`d`φ

Where the limits are 0 to π for θ and 0 to 2π for φ. Of course, this final result should have been obvious to anyone who's taken calculus.

^{1} If we use the sphere-as-Earth analogy, θ is the angle from the zenith (North Pole) -- also called the colatitude -- and φ is the angle about the equator. Since we are only concerned with directions, the radial coordinate can be safely ignored.

^{2} Technically, `d`**ω** is a vector. The direction of the vector is the same as the direction of **ω**. The magnitude of the vector is the same as the infinitesimal size of the differential element. However, in much of this writeup, the differential solid angle is treated as a scalar. Yeah, it's confusing, I know.