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

Comparing ray/src/util/klems_half.cal (file contents):
Revision 1.2 by greg, Mon Jul 21 15:59:47 2014 UTC vs.
Revision 1.3 by greg, Fri Mar 27 18:58:06 2015 UTC

# Line 32 | Line 32 | khbin2(pol,azi) = if(pol-90, -1,
32                  khaccum(7) + khazn(azi,360/khnaz(8))
33          ) );
34  
35 + RHS = 1;        { set to -1 for left-handed system }
36 +
37   khbin(Nx,Ny,Nz,Ux,Uy,Uz) = khbin2(Acos(-Dx*Nx-Dy*Ny-Dz*Nz),
38          Atan2(-Dx*Ux-Dy*Uy-Dz*Uz + (Nx*Dx+Ny*Dy+Nz*Dz)*(Nx*Ux+Ny*Uy+Nz*Uz),
39 <                -Dx*(Uy*Nz-Uz*Ny) - Dy*(Uz*Nx-Ux*Nz) - Dz*(Ux*Ny-Uy*Nx)));
39 >                -RHS*(Dx*(Uy*Nz-Uz*Ny) + Dy*(Uz*Nx-Ux*Nz) + Dz*(Ux*Ny-Uy*Nx))));
40                                  
41   Nkhbins : khaccum(khnaz(0));    { Number of bins for one elevation }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines