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

Comparing ray/src/rt/rayinit.cal (file contents):
Revision 1.3 by greg, Wed Oct 9 11:36:45 1991 UTC vs.
Revision 2.2 by greg, Mon Nov 25 09:51:57 1991 UTC

# Line 66 | Line 66 | noise3d(i,x,y,z) = select(i, noise3a(x,y,z), noise3b(x
66   bound(a,x,b) : if(a-x, a, if(x-b, b, x));
67   Acos(x) : acos(bound(-1,x,1));
68   Asin(x) : asin(bound(-1,x,1));
69 < Exp(x) : if(-x-60, 0, exp(x));
69 > Exp(x) : if(-x-100, 0, exp(x));
70   Sqrt(x) : if(x, sqrt(x), 0);
71  
72                          { Useful constants }
# Line 91 | Line 91 | linterp(t,p0,p1) : (1-t)*p0 + t*p1;
91  
92   noop(v) = v;
93   clip(v) = bound(0,v,1);
94 < noneg(v) = max(0,v);
95 < red(r,g,b) = r;
96 < green(r,g,b) = g;
97 < blue(r,g,b) = b;
94 > noneg(v) = if(v,v,0);
95 > red(r,g,b) = if(r,r,0);
96 > green(r,g,b) = if(g,g,0);
97 > blue(r,g,b) = if(b,b,0);
98   grey(r,g,b) = .3*r + .59*g + .11*b;
99   clip_r(r,g,b) = bound(0,r,1);
100   clip_g(r,g,b) = bound(0,g,1);
# Line 135 | Line 135 | turbulencec(x,y,z,s) = if( s-1.01, 0,
135  
136   un2`private(t) : t - (2.515517+t*(.802853+t*.010328))/
137                  (1+t*(1.432788+t*(.189269+t*.001308))) ;
138 < un1`private(p) : un2`private(sqrt(log(1/p/p))) ;
138 > un1`private(p) : un2`private(sqrt(-2*log(p))) ;
139  
140   unif2norm(p) : if( .5-p, un1`private(p), -un1`private(1-p) ) ;
141  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines