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

Comparing ray/src/util/rambpos.cal (file contents):
Revision 2.2 by greg, Fri Apr 25 18:13:47 2014 UTC vs.
Revision 2.5 by greg, Fri May 9 23:49:05 2014 UTC

# Line 6 | Line 6 | and(a,b) : if(a,b,a);
6                                  { level selector }
7   lvl = $10;
8   wt = $11;
9 cond = and( wt-MW, if(LV+.5, and(lvl-LV+.5,LV+.5-lvl), 6.5-lvl) );
10 px = $1; py = $2; pz = $3;
9   r0 = SF*$12; r1 = SF*$13;
10 + acond = and( r0-5e-5, and( wt-MW, if(LV+.5, and(lvl-LV+.5,LV+.5-lvl), 6.5-lvl) ) );
11 + px = $1; py = $2; pz = $3;
12   nx = $4; ny = $5; nz = $6;
13   ux = $7; uy = $8; uz = $9;
14   vx = ny*uz - nz*uy;
15   vy = nz*ux - nx*uz;
16   vz = nx*uy - ny*ux;
17 < avr = $14; avg = $15; avb = $16;
17 > avr = .5/PI*$14; avg = .5/PI*$15; avb = .5/PI*$16;
18                                  { magnified position gradient }
19   pgx = ($17*ux + $18*vx)/SF;
20   pgy = ($17*uy + $18*vy)/SF;
21   pgz = ($17*uz + $18*vz)/SF;
22   pg = sqrt(pgx*pgx + pgy*pgy + pgz*pgz);
23 + pcond = and( acond, pg - .0001 );
24                                  { direction gradient }
25   dgx = $19*ux + $20*vx;
26   dgy = $19*uy + $20*vy;
# Line 29 | Line 30 | agr = select(lvl+1, val, 0, 0, val, 0, val, val);
30   agg = select(lvl+1, 0, val, 0, val, val, 0, val/2);
31   agb = select(lvl+1, 0, 0, val, 0, val, val, val/2);
32   psiz = r0/10;
33 + dcond = and( acond, dgx*dgx+dgy*dgy+dgz*dgz - 1e-8 );
34                                  { base polygon vertices }
35   px1 = px + r0*ux + r1*vx + .0001*nx;
36   py1 = py + r0*uy + r1*vy + .0001*ny;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines