RayTracing / raytracing.github.io

Main Web Site (Online Books)
https://raytracing.github.io/
Creative Commons Zero v1.0 Universal
8.86k stars 870 forks source link

Book 3 - Ch 12.3: Position to measure theta_max #1624

Open cmookj opened 2 months ago

cmookj commented 2 months ago

Following all the contents up to Ch. 12.3, I think the angular measurement of theta should be at the center of the sphere, C, not at p. Hence, cos(theta_max) = R / || c - p ||.

I think the verification using the extreme cases also needs update accordingly.

The solid angle is 2 pi (1 - cos(theta_max)) and when R is extremely small, theta_max is nearly pi/2 and the solid angle approaches to 2 pi. This case is similar to the Sun lighting the half of the Earth from far, far away. If the sphere is tangent to p, theta_max approaches to 0, and cos(theta_max) goes to 1. The solid angle becomes 0. This makes sense because if we assume the Sun to be a point, and when it is right on the surface of the Earth, only a single point, where the Sun is, is illuminated.