ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/source.cal
(Generate patch)

Comparing ray/src/cv/source.cal (file contents):
Revision 2.7 by greg, Thu Dec 9 16:58:03 1993 UTC vs.
Revision 2.9 by greg, Sat Feb 22 02:07:23 2003 UTC

# Line 1 | Line 1
1 < { SCCSid "$SunId$ LBL" }
2 <
1 > { RCSid: $Id$ }
2   {
3          Source distribution coordinates (degrees).
4  
# Line 18 | Line 17
17          the x,y,z axes, are given in meters regardless of the
18          units being used in the scene file.
19  
20 +        cylcorr function provides the same correction for a
21 +        cylinder whose central axis is aligned with the Z-axis.
22 +
23          A1              - optional multipier
24          A2,A3,A4        - X,Y,Z dimensions of axis-aligned box (in meters!)
25 + or
26 +        A2,A3           - diameter and height of Z-aligned cylinder (meters)
27   }
28                                          { local definitions }
29   boxprojection = abs(Dx)*A3*A4 + abs(Dy)*A2*A4 + abs(Dz)*A2*A3;
30   lboxprojection = (      noneg(abs(Px-Dx*Ts)-A2/2)*A3*A4 +
31                          noneg(abs(Py-Dy*Ts)-A3/2)*A2*A4 +
32                          noneg(abs(Pz-Dz*Ts)-A4/2)*A2*A3 ) / Ts;
33 + cylprojection = A2*A3*sqrt(1-Dz*Dz) + PI/4*A2*A2*abs(Dz);
34  
35   flatcorr(v) = corr(v) / Rdot;           { correction for flat sources }
36   corr(v) = if(AC-.5, A1*v, v);           { multiplier correction }
37   boxcorr(v) = A1 * v / boxprojection;    { correction for emitting box }
38   lboxcorr(v) = A1 * v / lboxprojection;  { local box correction }
39 + cylcorr(v) = A1 * v / cylprojection;    { cylinder correction }
40  
41   src_theta = Acos(Dz) / DEGREE;                  { 0-180 }
42   src_phi = mod( Atan2(Dy, -Dx) / DEGREE, 360 );  { 0-360 }
# Line 40 | Line 46 | src_phi2 = tri( src_phi, 180 );                { 0-180 }
46   src_phi4 = tri( src_phi, 90 );          { 0-90 }
47  
48                                  { Type B photometry coordinates }
49 < srcB_vert = atan( -Dx/Dz ) / DEGREE;
50 < srcB_horiz = Asin(Dy) / DEGREE;
49 > srcB_vert = atan2( -Dx, Dz ) / DEGREE;
50 > srcB_horiz = atan2( Dy, Dz ) / DEGREE;
51                                  { w/ symmetry }
52   srcB_vert2 = abs( srcB_vert );
53   srcB_horiz2 = abs( srcB_horiz );

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines