home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 8
/
CDASC08.ISO
/
NEWS
/
RADIANCE
/
LIB
/
ILLUM.CAL
< prev
next >
Wrap
Text File
|
1993-10-07
|
656b
|
25 lines
{ SCCSid "@(#)illum.cal 2.5 8/13/92 LBL" }
{
Coordinate computations for mkillum output.
There are no arguments for the spherical case:
il_alt - Altitude (1 to -1) for spherical coordinates
il_azi - Azimuth (0 to 2*PI) for sphere
For the hemispherical case, A1-A9 are the unit vectors for the
hemisphere's coordinate system:
il_alth - Altitude (1 to 0) for hemispherical coordinates
il_azih - Azimuth (0 to 2*PI) for hemisphere
}
il_alt = Dz;
il_azi = norm_rad(atan2(Dy, Dx));
il_alth = sq(-Dx*A7-Dy*A8-Dz*A9);
il_azih = norm_rad(atan2(-Dx*A4-Dy*A5-Dz*A6, -Dx*A1-Dy*A2-Dz*A3));
norm_rad(r) = if( r, r, r+2*PI );