22 |
|
extern int nowarn; /* don't report warnings? */ |
23 |
|
|
24 |
|
/* current sensor's perspective */ |
25 |
< |
VIEW ourview = STDVIEW; |
25 |
> |
VIEW ourview = {VT_ANG,{0.,0.,0.},{0.,0.,1.},{1.,0.,0.}, |
26 |
> |
1.,180.,180.,0.,0.,0.,0., |
27 |
> |
{0.,0.,0.},{0.,0.,0.},0.,0.}; |
28 |
|
|
29 |
|
unsigned long nsamps = 10000; /* desired number of initial samples */ |
30 |
|
unsigned long nssamps = 9000; /* number of super-samples */ |
475 |
|
setcolor(vsum, .0f, .0f, .0f); |
476 |
|
nt = (int)(sqrt((double)nsamps*ntheta/nphi) + .5); |
477 |
|
np = nsamps/nt; |
476 |
– |
VCOPY(rr.rorg, ourview.vp); |
477 |
– |
rr.rmax = .0; |
478 |
|
for (i = 0; i < nt; i++) |
479 |
|
for (j = 0; j < np; j++) { |
480 |
+ |
VCOPY(rr.rorg, ourview.vp); |
481 |
|
get_direc(rr.rdir, (i+frandom())/nt, (j+frandom())/np); |
482 |
+ |
if (ourview.vfore > FTINY) |
483 |
+ |
VSUM(rr.rorg, rr.rorg, rr.rdir, ourview.vfore); |
484 |
+ |
rr.rmax = .0; |
485 |
|
rayorigin(&rr, PRIMARY, NULL, NULL); |
486 |
|
if (ray_pqueue(&rr) == 1) |
487 |
|
addcolor(vsum, rr.rcol); |