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

Comparing ray/src/rt/source.c (file contents):
Revision 1.30 by greg, Mon Feb 11 08:43:48 1991 UTC vs.
Revision 1.32 by greg, Fri Jun 14 14:58:49 1991 UTC

# Line 215 | Line 215 | register int  sn;              /* source number */
215          }
216          if (dstrsrc > FTINY) {
217                                          /* distribute source direction */
218 <                for (i = 0; i < 3; i++)
219 <                        vd[i] = dstrsrc * source[sn].ss * (1.0 - 2.0*frandom());
220 <
218 >                dimlist[ndims++] = sn;
219 >                for (i = 0; i < 3; i++) {
220 >                        dimlist[ndims] = i + 8831;
221 >                        vd[i] = dstrsrc * source[sn].ss *
222 >                (1.0 - 2.0*urand(ilhash(dimlist,ndims+1)+samplendx));
223 >                }
224 >                ndims--;
225                  if (norm != NULL) {             /* project offset */
226                          d = DOT(vd, norm);
227                          for (i = 0; i < 3; i++)
# Line 469 | Line 473 | register RAY  *r;
473                                    m->oargs.farg[2]);
474                                                  /* modify value */
475                  multcolor(r->rcol, r->pcol);
472                                                /* assign distance */
473                r->rt = r->rot;
476          }
477   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines