home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / video / render / radiance.lzh / ray / lib / source.cal < prev    next >
Encoding:
Text File  |  1991-11-12  |  1.1 KB  |  36 lines

  1. { SCCSid "@(#)source.cal 2.1 11/12/91 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 );
  36.