--- ray/src/rt/rtrace.c 2006/02/22 17:05:36 2.52 +++ ray/src/rt/rtrace.c 2007/11/17 06:21:58 2.55 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rtrace.c,v 2.52 2006/02/22 17:05:36 greg Exp $"; +static const char RCSid[] = "$Id: rtrace.c,v 2.55 2007/11/17 06:21:58 greg Exp $"; #endif /* * rtrace.c - program and variables for individual ray tracing. @@ -47,14 +47,18 @@ char *outvals = "v"; /* output specification */ int do_irrad = 0; /* compute irradiance? */ -int rand_samp = 0; /* pure Monte Carlo sampling? */ +int rand_samp = 1; /* pure Monte Carlo sampling? */ void (*trace)() = NULL; /* trace call */ -char *tralist[128]; /* list of modifers to trace (or no) */ +#ifndef MAXMODLIST +#define MAXMODLIST 1024 /* maximum modifiers we'll track */ +#endif + +char *tralist[MAXMODLIST]; /* list of modifers to trace (or no) */ int traincl = -1; /* include == 1, exclude == 0 */ #ifndef MAXTSET -#define MAXTSET 8192 /* maximum number in trace set */ +#define MAXTSET 8191 /* maximum number in trace set */ #endif OBJECT traset[MAXTSET+1]={0}; /* trace include/exclude set */ @@ -198,7 +202,7 @@ rtrace( /* trace rays from file */ nextflush = hresolu; } } else { - samplendx = rand_samp ? random() : samplendx+1; + samplendx++; /* compute and print */ if (imm_irrad) irrad(orig, direc);