How to calculate solid angles of segments of hemisphere from abstract points

36 Views Asked by At

I am imagining a half-sphere which has been cut, pizza-style, into many slices, which may vary in size. I want to specify a point inside the semi-sphere at random and be able to identify what solid angle each of the slices subtends from the perspective of that point.

Take the picture below - I've specified the r, $\theta$, and z of the red point, and now I want to derive, from the position coordinates of the point, the radius of the sphere, and the theta at which each of the segments begins, how large of a solid angle each of those segments subtends from the perspective of the red point.

(Note - I'm also interested in how large a solid angle the floor subtends, but I'm figuring that the multiplicity of spherical segments would make it best to figure all those out first and then subtract their sum from $4\pi$.)

Point within divided hemisphere