ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/source.cal
Revision: 2.1
Committed: Tue Nov 12 17:02:13 1991 UTC (32 years, 4 months ago) by greg
Branch: MAIN
Changes since 1.2: +0 -0 lines
Log Message:
updated revision number for release 2.0

File Contents

# User Rev Content
1 greg 1.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 greg 1.2 A1 - optional multipier
14     A2,A3,A4 - X,Y,Z dimensions of axis-aligned box
15 greg 1.1 }
16 greg 1.2 { 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 greg 1.1
20     flatcorr(v) = corr(v) / Rdot; { correction for flat sources }
21     corr(v) = if(AC-.5, A1*v, v); { multiplier correction }
22 greg 1.2 boxcorr(v) = A1 * v / boxprojection; { correction for emitting box }
23 greg 1.1
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 );