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

Comparing ray/src/util/rsensor.c (file contents):
Revision 2.4 by greg, Fri Feb 22 21:52:10 2008 UTC vs.
Revision 2.5 by greg, Fri Apr 11 22:06:04 2008 UTC

# Line 22 | Line 22 | extern char    *progname;      /* global argv[0] */
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 */
# Line 473 | Line 475 | comp_sensor(
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);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines