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

Comparing ray/src/rt/raycalls.c (file contents):
Revision 2.11 by greg, Tue Apr 19 01:15:06 2005 UTC vs.
Revision 2.16 by greg, Wed Apr 5 06:22:56 2006 UTC

# Line 90 | Line 90 | static const char      RCSid[] = "$Id$";
90   */
91  
92   #include <string.h>
93 + #include <time.h>
94  
95   #include  "ray.h"
96   #include  "source.h"
# Line 118 | Line 119 | void   (*addobjnotify[8])() = {ambnotify, NULL};
119  
120   int     do_irrad = 0;                   /* compute irradiance? */
121  
122 + int     rand_samp = 0;                  /* pure Monte Carlo sampling? */
123 +
124   double  dstrsrc = 0.0;                  /* square source distribution */
125   double  shadthresh = .03;               /* shadow threshold */
126   double  shadcert = .75;                 /* shadow certainty */
# Line 162 | Line 165 | ray_init(                      /* initialize ray-tracing calculation */
165          if (ofun[OBJ_SPHERE].funp == o_default)
166                  initotypes();
167                                          /* initialize urand */
168 <        initurand(2048);
168 >        if (rand_samp) {
169 >                srandom((long)time(0));
170 >                initurand(0);
171 >        } else {
172 >                srandom(0L);
173 >                initurand(2048);
174 >        }
175                                          /* read scene octree */
176          readoct(octname = otnm, ~(IO_FILES|IO_INFO), &thescene, NULL);
177          nsceneobjs = nobjects;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines