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

Comparing ray/src/rt/virtuals.c (file contents):
Revision 1.12 by greg, Tue Jun 25 16:42:05 1991 UTC vs.
Revision 1.13 by greg, Wed Jun 26 08:55:10 1991 UTC

# Line 19 | Line 19 | static char SCCSid[] = "$SunId$ LBL";
19  
20   #include  "random.h"
21  
22 + #define  MINSAMPLES     3               /* minimum number of pretest samples */
23 + #define  STESTMAX       30              /* maximum seeks per sample */
24  
25 +
26   double  getdisk();
27  
28   static OBJECT  *vobject;                /* virtual source objects */
# Line 272 | Line 275 | register int  sn;      /* target source number */
275                  n = or2/DOT(offsdir,offsdir)*vspretest + .5;
276                  infront = DOT(onorm, offsdir) > 0.;
277          }
278 <        if (n < 1) n = 1;
278 >        if (n < MINSAMPLES) n = MINSAMPLES;
279   #ifdef DEBUG
280          fprintf(stderr, "pretesting source %d in object %s with %d rays\n",
281                          sn, o->oname, n);
282   #endif
283                                  /* sample */
284          or = sqrt(or2);
285 <        ssn = 25*n;
285 >        ssn = STESTMAX*n;
286          nhit = nok = 0;
287          while (n-- > 0) {
288                                          /* get sample point */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines