ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/gen/skybright.cal
Revision: 2.4
Committed: Mon Jun 7 13:08:58 1993 UTC (30 years, 10 months ago) by greg
Branch: MAIN
Changes since 2.3: +2 -4 lines
Log Message:
minor simplification

File Contents

# User Rev Content
1 greg 1.1 { SCCSid "$SunId$ LBL" }
2    
3     {
4     Sky brightness function for sunny and cloudy skies.
5    
6     6/6/86
7    
8     Additional arguments required for calculation of skybright:
9    
10     A1 - boolean, positive for cloudy sky
11 greg 2.4 (A1>=2 for uniform sky)
12 greg 1.1 A2 - zenith brightness
13     A3 - ground plane brightness
14     A4 - normalization factor based on sun direction
15     A5,A6,A7 - sun direction
16     }
17    
18     skybright = wmean((Dz+1.01)^10, if(A1, cloudysky, sunnysky),
19     (Dz+1.01)^-10, A3);
20    
21     wmean(a, x, b, y) = (a*x + b*y) / (a + b);
22    
23 greg 2.3 cloudysky = A2 * if(A1-1.5, 1, (1 + 2*Dz)/3);
24 greg 1.1
25 greg 2.4 sunnysky = A2 * (.91 + 10*exp(-3*Acos(cosgamma)) + .45*cosgamma*cosgamma)
26 greg 1.1 * if( Dz - .01, 1.0 - exp(-.32/Dz), 1.0) / A4;
27    
28     cosgamma = Dx*A5 + Dy*A6 + Dz*A7;