46 |
|
|
47 |
|
int do_irrad = 0; /* compute irradiance? */ |
48 |
|
|
49 |
+ |
int rand_samp = 0; /* pure Monte Carlo sampling? */ |
50 |
+ |
|
51 |
|
void (*trace)() = NULL; /* trace call */ |
52 |
|
|
53 |
|
char *tralist[128]; /* list of modifers to trace (or no) */ |
54 |
|
int traincl = -1; /* include == 1, exclude == 0 */ |
55 |
< |
#define MAXTSET 511 /* maximum number in trace set */ |
55 |
> |
#ifndef MAXTSET |
56 |
> |
#define MAXTSET 1024 /* maximum number in trace set */ |
57 |
> |
#endif |
58 |
|
OBJECT traset[MAXTSET+1]={0}; /* trace include/exclude set */ |
59 |
|
|
60 |
|
int hresolu = 0; /* horizontal (scan) size */ |
197 |
|
nextflush = hresolu; |
198 |
|
} |
199 |
|
} else { |
200 |
< |
samplendx++; |
200 |
> |
samplendx = rand_samp ? random() : samplendx+1; |
201 |
|
/* compute and print */ |
202 |
|
if (imm_irrad) |
203 |
|
irrad(orig, direc); |