--- ray/src/rt/rv3.c 1990/10/14 11:06:27 1.17 +++ ray/src/rt/rv3.c 1991/11/12 17:09:47 2.1 @@ -157,6 +157,7 @@ int xmin, ymin, xmax, ymax; setcolor(thisray.rcol, 0.0, 0.0, 0.0); } else { rayorigin(&thisray, NULL, PRIMARY, 1.0); + samplendx++; rayvalue(&thisray); } @@ -178,6 +179,8 @@ newimage() /* start a new image */ { /* free old image */ freepkids(&ptrunk); + /* save reserve memory */ + fillreserves(); /* compute resolution */ hresolu = dev->xsiz; vresolu = dev->ysiz; @@ -432,27 +435,4 @@ double zf; vp->vert = asin(vp->vert) / (PI/180./2.); return; } -} - - -spinvector(vres, vorig, vnorm, theta) /* rotate vector around normal */ -FVECT vres, vorig, vnorm; -double theta; -{ - extern double sin(), cos(); - double sint, cost, dotp; - FVECT vperp; - register int i; - - if (theta == 0.0) { - VCOPY(vres, vorig); - return; - } - sint = sin(theta); - cost = cos(theta); - dotp = DOT(vorig, vnorm); - fcross(vperp, vnorm, vorig); - for (i = 0; i < 3; i++) - vres[i] = vnorm[i]*dotp*(1.-cost) + - vorig[i]*cost + vperp[i]*sint; }