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

Comparing ray/src/util/disk2square.cal (file contents):
Revision 2.1 by greg, Mon Jul 21 15:59:47 2014 UTC vs.
Revision 2.2 by greg, Tue Jul 22 23:21:56 2014 UTC

# Line 73 | Line 73 | out_square_y = (out_square_b + 1)/2;
73   }
74  
75                                  { Compute oriented axis values }
76 < inc_dot = -Dx*Nx-Dy*Ny-Dz*Nz;
76 > inc_dz = -Dx*Nx-Dy*Ny-Dz*Nz;
77   inc_rx = -Dx*(Uy*Nz-Uz*Ny) - Dy*(Uz*Nx-Ux*Nz) - Dz*(Ux*Ny-Uy*Nx);
78 < inc_ry = -Dx*Ux-Dy*Uy-Dz*Uz - inc_dot*(Nx*Ux+Ny*Uy+Nz*Uz);
78 > inc_ry = -Dx*Ux-Dy*Uy-Dz*Uz - inc_dz*(Nx*Ux+Ny*Uy+Nz*Uz);
79   inc_den2 = inc_rx*inc_rx + inc_ry*inc_ry;
80 < inc_radf = if(inc_den2-1e-7, sqrt((1 - inc_dot*inc_dot)/inc_den2), 0);
80 > inc_radf = if(inc_den2-1e-7, sqrt((1 - inc_dz* inc_dz)/inc_den2), 0);
81                                  { Pass to formulas in first section }
82   in_disk_x = inc_rx*inc_radf;
83   in_disk_y = inc_ry*inc_radf;
84                                  { Compute final bin (-1 if behind surface) }
85 < scbin = if(inc_dot,
85 > scbin = if(inc_dz,
86                  floor(out_square_x*SCdim)*SCdim + floor(out_square_y*SCdim),
87                  -1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines