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

Comparing ray/src/util/klems_quarter.cal (file contents):
Revision 1.2 by greg, Sat Jul 19 00:30:03 2014 UTC vs.
Revision 1.4 by greg, Mon Jul 21 15:59:47 2014 UTC

# Line 13 | Line 13 | posangle(a) : if(-a, a + 2*PI, a) / DEGREE;
13   Atan2(y,x) : posangle(atan2(y,x));
14  
15   kqpola(r) : select(r, 9, 27, 46, 66, 90);
16 < kqnaz(r) : select(r, 1, 88, 12, 12, 8);
16 > kqnaz(r) : select(r, 1, 8, 12, 12, 8);
17   kqaccum(r) : if(r-.5, kqnaz(r) + kqaccum(r-1), 0);
18   kqfindrow(r, pol) : if(r-kqpola(0)+.5, r,
19                  if(pol-kqpola(r), kqfindrow(r+1, pol), r) );
# Line 30 | Line 30 | kqbin2(pol,azi) = if(pol-90, -1,
30          ) );
31  
32   kqbin(Nx,Ny,Nz,Ux,Uy,Uz) = kqbin2(Acos(-Dx*Nx-Dy*Ny-Dz*Nz),
33 <        Atan2(-Dx*Ux-Dy*Uy-Dz*Uz,
33 >        Atan2(-Dx*Ux-Dy*Uy-Dz*Uz + (Nx*Dx+Ny*Dy+Nz*Dz)*(Nx*Ux+Ny*Uy+Nz*Uz),
34                  -Dx*(Uy*Nz-Uz*Ny) - Dy*(Uz*Nx-Ux*Nz) - Dz*(Ux*Ny-Uy*Nx)));
35                                  
36   Nkqbins : kqaccum(kqnaz(0));    { Number of bins for one elevation }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines