--- ray/src/hd/rhdisp2.c 1998/11/24 17:05:36 3.26 +++ ray/src/hd/rhdisp2.c 1998/12/10 10:45:55 3.28 @@ -17,10 +17,10 @@ static char SCCSid[] = "$SunId$ SGI"; #define MAXDIST 42 /* maximum distance outside section */ #endif #ifndef NVSAMPS -#define NVSAMPS 4096 /* number of ray samples per view */ +#define NVSAMPS 16384 /* number of ray samples per view */ #endif #ifndef MEYERNG -#define MEYERNG 0.2 /* target mean eye range (rel. to grid) */ +#define MEYERNG 0.1 /* target mean eye range (rel. to grid) */ #endif #ifndef MAXTODO #define MAXTODO 3 /* maximum sections to look at */ @@ -285,13 +285,14 @@ int hr, vr; addview(todo[i], vn, hr, vr); if (MEYERNG <= FTINY || vn->type == VT_PAR) return(1); - hdgsiz = 0.; d = 1./3. / n; /* compute mean grid size */ + hdgsiz = 0.; /* compute mean grid size */ for (i = 0; i < n; i++) { hp = hdlist[todo[i]]; - hdgsiz += d * ( VLEN(hp->xv[0])/hp->grid[0] + - VLEN(hp->xv[1])/hp->grid[1] + - VLEN(hp->xv[2])/hp->grid[2] ) ; + hdgsiz += 1./3. / VLEN(hp->wg[0]) + + 1./3. / VLEN(hp->wg[1]) + + 1./3. / VLEN(hp->wg[2]) ; } + hdgsiz /= (double)n; /* add to current eye position */ if (cureye.rng <= FTINY) { VCOPY(cureye.vpt, vn->vp);