ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/source.cal
Revision: 1.2
Committed: Tue Oct 15 13:09:46 1991 UTC (32 years, 6 months ago) by greg
Branch: MAIN
Changes since 1.1: +6 -3 lines
Log Message:
added boxcorr function for parallelopiped sources

File Contents

# Content
1 { SCCSid "$SunId$ LBL" }
2
3 {
4 Source distribution coordinates (degrees).
5
6 Theta is measured from the negative z-axis,
7 phi is measured from the positive x-axis
8 according to the right-hand rule.
9
10 srcB_vert and srcB_horiz are angles
11 used in type B photometry.
12
13 A1 - optional multipier
14 A2,A3,A4 - X,Y,Z dimensions of axis-aligned box
15 }
16 { local definitions }
17 norm_deg(d) : if( d, d, d+360 );
18 boxprojection = abs(Dx)*A3*A4 + abs(Dy)*A2*A4 + abs(Dz)*A2*A3;
19
20 flatcorr(v) = corr(v) / Rdot; { correction for flat sources }
21 corr(v) = if(AC-.5, A1*v, v); { multiplier correction }
22 boxcorr(v) = A1 * v / boxprojection; { correction for emitting box }
23
24 src_theta = Acos(Dz) / DEGREE; { 0-180 }
25 src_phi = norm_deg( atan2(Dy, Dx) / DEGREE ); { 0-360 }
26 { bilateral symmetry }
27 src_phi2 = tri( src_phi, 180 ); { 0-180 }
28 { quadrilateral symmetry }
29 src_phi4 = tri( src_phi, 90 ); { 0-90 }
30
31 { Type B photometry coordinates }
32 srcB_vert = atan( -Dx/Dz ) / DEGREE;
33 srcB_horiz = Asin(Dy) / DEGREE;
34 { w/ bilateral symmetry }
35 srcB_horiz2 = abs( srcB_horiz );