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.8 by gregl, Fri Jul 25 12:08:06 1997 UTC

# Line 18 | Line 18
18          the x,y,z axes, are given in meters regardless of the
19          units being used in the scene file.
20  
21 +        cylcorr function provides the same correction for a
22 +        cylinder whose central axis is aligned with the Z-axis.
23 +
24          A1              - optional multipier
25          A2,A3,A4        - X,Y,Z dimensions of axis-aligned box (in meters!)
26 + or
27 +        A2,A3           - diameter and height of Z-aligned cylinder (meters)
28   }
29                                          { local definitions }
30   boxprojection = abs(Dx)*A3*A4 + abs(Dy)*A2*A4 + abs(Dz)*A2*A3;
31   lboxprojection = (      noneg(abs(Px-Dx*Ts)-A2/2)*A3*A4 +
32                          noneg(abs(Py-Dy*Ts)-A3/2)*A2*A4 +
33                          noneg(abs(Pz-Dz*Ts)-A4/2)*A2*A3 ) / Ts;
34 + cylprojection = A2*A3*sqrt(1-Dz*Dz) + PI/4*A2*A2*abs(Dz);
35  
36   flatcorr(v) = corr(v) / Rdot;           { correction for flat sources }
37   corr(v) = if(AC-.5, A1*v, v);           { multiplier correction }
38   boxcorr(v) = A1 * v / boxprojection;    { correction for emitting box }
39   lboxcorr(v) = A1 * v / lboxprojection;  { local box correction }
40 + cylcorr(v) = A1 * v / cylprojection;    { cylinder correction }
41  
42   src_theta = Acos(Dz) / DEGREE;                  { 0-180 }
43   src_phi = mod( Atan2(Dy, -Dx) / DEGREE, 360 );  { 0-360 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines