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

Comparing ray/src/util/ambpos.cal (file contents):
Revision 2.1 by greg, Thu Apr 24 23:15:42 2014 UTC vs.
Revision 2.2 by greg, Thu May 1 02:52:03 2014 UTC

# Line 10 | Line 10 | rpz = Pz - arg(3);
10   { Calculation of directional gradient pattern }
11   ndx = arg(4); ndy = arg(5); ndz = arg(6);
12   dgx = arg(7); dgy = arg(8); dgz = arg(9);
13 < dg = sqrt(dgx*dgx + dgy*dgy + dgz*dgz);
14 < dux = (ndy*dgz - ndz*dgy)/dg;
15 < duy = (ndz*dgx - ndx*dgz)/dg;
16 < duz = (ndx*dgy - ndy*dgx)/dg;
17 < dsine = (dux*rpx + duy*rpy + duz*rpz)/sqrt(rpx*rpx + rpy*rpy + rpz*rpz);
18 < dirfunc = bound(0, 1 + dg*dsine, 2);
13 > rdx = ndy*rpz - ndz*rpy;
14 > rdy = ndz*rpx - ndx*rpz;
15 > rdz = ndx*rpy - ndy*rpx;
16 > dgrad = (rdx*dgx + rdy*dgy + rdz*dgz)/sqrt(rpx*rpx + rpy*rpy + rpz*rpz);
17 > dirfunc = bound(0, 1 + dgrad, 2);
18 >
19 > { Relative hit point }
20 > rpx = Px - arg(1);
21 > rpy = Py - arg(2);
22 > rpz = Pz - arg(3);
23  
24   { Calculation of positional gradient pattern }
25   pgx = arg(4); pgy = arg(5); pgz = arg(6);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines