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

Comparing ray/src/rt/rv3.c (file contents):
Revision 1.17 by greg, Sun Oct 14 11:06:27 1990 UTC vs.
Revision 2.1 by greg, Tue Nov 12 17:09:47 1991 UTC

# Line 157 | Line 157 | int  xmin, ymin, xmax, ymax;
157                  setcolor(thisray.rcol, 0.0, 0.0, 0.0);
158          } else {
159                  rayorigin(&thisray, NULL, PRIMARY, 1.0);
160 +                samplendx++;
161                  rayvalue(&thisray);
162          }
163  
# Line 178 | Line 179 | newimage()                             /* start a new image */
179   {
180                                                  /* free old image */
181          freepkids(&ptrunk);
182 +                                                /* save reserve memory */
183 +        fillreserves();
184                                                  /* compute resolution */
185          hresolu = dev->xsiz;
186          vresolu = dev->ysiz;
# Line 432 | Line 435 | double  zf;
435                          vp->vert = asin(vp->vert) / (PI/180./2.);
436                  return;
437          }
435 }
436
437
438 spinvector(vres, vorig, vnorm, theta)   /* rotate vector around normal */
439 FVECT  vres, vorig, vnorm;
440 double  theta;
441 {
442        extern double  sin(), cos();
443        double  sint, cost, dotp;
444        FVECT  vperp;
445        register int  i;
446        
447        if (theta == 0.0) {
448                VCOPY(vres, vorig);
449                return;
450        }
451        sint = sin(theta);
452        cost = cos(theta);
453        dotp = DOT(vorig, vnorm);
454        fcross(vperp, vnorm, vorig);
455        for (i = 0; i < 3; i++)
456                vres[i] = vnorm[i]*dotp*(1.-cost) +
457                                vorig[i]*cost + vperp[i]*sint;
438   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines