--- ray/src/rt/rv3.c 2005/01/21 00:52:59 2.15 +++ ray/src/rt/rv3.c 2005/06/13 20:07:56 2.18 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rv3.c,v 2.15 2005/01/21 00:52:59 greg Exp $"; +static const char RCSid[] = "$Id: rv3.c,v 2.18 2005/06/13 20:07:56 greg Exp $"; #endif /* * rv3.c - miscellaneous routines for rview. @@ -108,7 +108,7 @@ double *mp; return(-1); } if (!direc || ourview.type == VT_PAR) { - rayorigin(&thisray, NULL, PRIMARY, 1.0); + rayorigin(&thisray, PRIMARY, NULL, NULL); if (!localhit(&thisray, &thescene)) { error(COMMAND, "not a local object"); return(-1); @@ -170,8 +170,8 @@ int xmin, ymin, xmax, ymax; h/hresolu, v/vresolu)) < -FTINY) { setcolor(thisray.rcol, 0.0, 0.0, 0.0); } else { - rayorigin(&thisray, NULL, PRIMARY, 1.0); - samplendx++; + rayorigin(&thisray, PRIMARY, NULL, NULL); + samplendx = rand_samp ? random() : samplendx+1; rayvalue(&thisray); } @@ -416,7 +416,7 @@ FVECT vc; nv.vaft += d - d*mag; if (nv.vaft <= nv.vfore) nv.vaft = 0.0; } - nv.vdist += d - d*mag; + nv.vdist /= mag; } for (i = 0; i < 3; i++) nv.vp[i] = vc[i] - d*nv.vdir[i];