Power Cosine Weighted Hemisphere Cap
The probability of each sample is weighted by a power of its cosine with the normal. Samples are chosen from a cap of the hemisphere, defined by a maximum elevation angle.
Here is the result:
function pow_cos_hemisphere_cap(theta_max,n){
const u_1 = Math.random();
const u_2 = Math.random();
const theta = Math.acos(Math.pow(
1.0 - u_1 * (1.0 - Math.pow(Math.cos(theta_max),n+1)),
1.0/(n+1)
));
const phi = u_2 * 2.0 * Math.PI;
return [theta,phi];
}
Algorithm
Generate points weighted by a power cosine with power on the sphere cap defined by the maximum elevation angle
- Choose uniform numbers in
- Calculate
- Calculate
Optionally convert to cartesian coordinates with:
PDF Used In Monte Carlo Integration
Derivation
This is a special case of the power cosine weighted hemisphere sector with