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

Comparing ray/src/rt/normal.c (file contents):
Revision 2.36 by gregl, Sun Nov 30 12:32:45 1997 UTC vs.
Revision 2.37 by gwlarson, Wed Dec 16 18:14:58 1998 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1996 Regents of the University of California */
1 > /* Copyright (c) 1998 Silicon Graphics, Inc. */
2  
3   #ifndef lint
4 < static char SCCSid[] = "$SunId$ LBL";
4 > static char SCCSid[] = "$SunId$ SGI";
5   #endif
6  
7   /*
# Line 368 | Line 368 | register NORMDAT  *np;
368                                  d = urand(ilhash(dimlist,ndims)+samplendx);
369                          multisamp(rv, 2, d);
370                          d = 2.0*PI * rv[0];
371 <                        cosp = cos(d);
372 <                        sinp = sin(d);
371 >                        cosp = tcos(d);
372 >                        sinp = tsin(d);
373                          rv[1] = 1.0 - specjitter*rv[1];
374                          if (rv[1] <= FTINY)
375                                  d = 1.0;
# Line 400 | Line 400 | register NORMDAT  *np;
400                                  d = urand(ilhash(dimlist,ndims)+1823+samplendx);
401                          multisamp(rv, 2, d);
402                          d = 2.0*PI * rv[0];
403 <                        cosp = cos(d);
404 <                        sinp = sin(d);
403 >                        cosp = tcos(d);
404 >                        sinp = tsin(d);
405                          rv[1] = 1.0 - specjitter*rv[1];
406                          if (rv[1] <= FTINY)
407                                  d = 1.0;
408                          else
409 <                                d = sqrt( -log(rv[1]) * np->alpha2 );
409 >                                d = sqrt( np->alpha2 * -log(rv[1]) );
410                          for (i = 0; i < 3; i++)
411                                  sr.rdir[i] = np->prdir[i] + d*(cosp*u[i] + sinp*v[i]);
412                          if (DOT(sr.rdir, r->ron) < -FTINY) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines