--- ray/src/rt/raycalls.c 2005/06/13 20:07:56 2.12 +++ ray/src/rt/raycalls.c 2005/06/15 15:36:52 2.14 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: raycalls.c,v 2.12 2005/06/13 20:07:56 greg Exp $"; +static const char RCSid[] = "$Id: raycalls.c,v 2.14 2005/06/15 15:36:52 greg Exp $"; #endif /* * raycalls.c - interface for running Radiance rendering as a library @@ -90,6 +90,7 @@ static const char RCSid[] = "$Id: raycalls.c,v 2.12 20 */ #include +#include #include "ray.h" #include "source.h" @@ -118,6 +119,8 @@ void (*addobjnotify[8])() = {ambnotify, NULL}; int do_irrad = 0; /* compute irradiance? */ +int rand_samp = 0; /* pure Monte Carlo sampling? */ + double dstrsrc = 0.0; /* square source distribution */ double shadthresh = .03; /* shadow threshold */ double shadcert = .75; /* shadow certainty */ @@ -163,6 +166,7 @@ ray_init( /* initialize ray-tracing calculation */ initotypes(); /* initialize urand */ initurand(2048); + srandom(rand_samp ? (long)time(0) : 0L); /* read scene octree */ readoct(octname = otnm, ~(IO_FILES|IO_INFO), &thescene, NULL); nsceneobjs = nobjects;