home *** CD-ROM | disk | FTP | other *** search
- { SCCSid "@(#)skybright.cal 2.3 6/17/92 LBL" }
-
- {
- Sky brightness function for sunny and cloudy skies.
-
- 6/6/86
-
- Additional arguments required for calculation of skybright:
-
- A1 - boolean, positive for cloudy sky
- (A1>=2 for cloudy uniform sky)
- A2 - zenith brightness
- A3 - ground plane brightness
- A4 - normalization factor based on sun direction
- A5,A6,A7 - sun direction
- }
-
- skybright = wmean((Dz+1.01)^10, if(A1, cloudysky, sunnysky),
- (Dz+1.01)^-10, A3);
-
- wmean(a, x, b, y) = (a*x + b*y) / (a + b);
-
- cloudysky = A2 * if(A1-1.5, 1, (1 + 2*Dz)/3);
-
- sunnysky = A2 * (.91 + 10*exp(-3*gamma) + .45*cosgamma*cosgamma)
- * if( Dz - .01, 1.0 - exp(-.32/Dz), 1.0) / A4;
-
- gamma = Acos(cosgamma);
-
- cosgamma = Dx*A5 + Dy*A6 + Dz*A7;
-