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 1.19 by greg, Fri May 3 16:12:38 1991 UTC

# Line 178 | Line 178 | newimage()                             /* start a new image */
178   {
179                                                  /* free old image */
180          freepkids(&ptrunk);
181 +                                                /* save reserve memory */
182 +        fillreserves();
183                                                  /* compute resolution */
184          hresolu = dev->xsiz;
185          vresolu = dev->ysiz;
# Line 432 | Line 434 | double  zf;
434                          vp->vert = asin(vp->vert) / (PI/180./2.);
435                  return;
436          }
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;
437   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines