ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/gen/perezlum.cal
Revision: 1.1
Committed: Sat Jun 6 20:20:04 2009 UTC (14 years, 9 months ago) by greg
Branch: MAIN
CVS Tags: rad4R2P2, rad5R0, rad5R1, rad4R2, rad4R1, rad4R0, rad4R2P1
Log Message:
Added Jean-Jacques Delaunay's gendaylit program to distribution

File Contents

# Content
1 { RCSid $Id$ }
2
3 {
4 All-weather Angular Sky Luminance Distribution .
5
6 Additional arguments required for calculation of skybright:
7
8 A1 - diffus normalization
9 A2 - ground brightness
10 A3,A4,A5,A6,A7 - coefficients for the Perez model
11 A8,A9,A10 - sun direction
12 }
13
14
15
16
17 skybright = wmean((Dz+1.01)^10, intersky, (Dz+1.01)^-10, A2 );
18
19 wmean(a, x, b, y) = (a*x+b*y)/(a+b);
20
21 intersky = if( (Dz-0.01),
22 A1 * (1 + A3*Exp(A4/Dz) ) * ( 1 + A5*Exp(A6*gamma) + A7*cos(gamma)*cos(gamma) ),
23 A1 * (1 + A3*Exp(A4/0.01) ) * ( 1 + A5*Exp(A6*gamma) + A7*cos(gamma)*cos(gamma) ) );
24
25
26
27
28 cosgamma = Dx*A8 + Dy*A9 + Dz*A10;
29
30 gamma = Acos(cosgamma); { angle from sun to this point in sky }
31
32 zt = Acos(A10); { angle from zenith to sun }
33
34 eta = Acos(Dz); { angle from zenith to this point in sky }