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

Comparing ray/src/px/pcond4.c (file contents):
Revision 3.3 by greg, Fri Oct 4 16:10:43 1996 UTC vs.
Revision 3.4 by greg, Fri Oct 4 17:51:41 1996 UTC

# Line 99 | Line 99 | compveil()                             /* compute veiling image */
99                                          t2 = DOT(rdirscan(py)[px],
100                                                          rdirscan(y)[x]);
101                                          if (t2 <= FTINY) continue;
102 +                                        /*      use approximation instead
103                                          t2 = acos(t2);
104                                          t2 = 1./(t2*t2);
105 +                                        */
106 +                                        t2 = .5 / (1. - t2);
107                                          copycolor(ctmp, fovscan(y)[x]);
108                                          scalecolor(ctmp, t2);
109                                          addcolor(vsum, ctmp);
# Line 355 | Line 358 | initacuity()                   /* initialize variable acuity sampling
358                          }
359                          fcross(cp, diffx, diffy);
360                          omega = 0.5 * sqrt(DOT(cp,cp));
361 <                        tsampr(x,y) = PI/180. / sqrt(omega) /
362 <                                        hacuity(plum(fovscan(y)[x]));
363 <                        if (tsampr(x,y) > maxsr)
361 >                        if (omega <= FTINY)
362 >                                tsampr(x,y) = 1.;
363 >                        else if ((tsampr(x,y) = PI/180. / sqrt(omega) /
364 >                                        hacuity(plum(fovscan(y)[x]))) > maxsr)
365                                  maxsr = tsampr(x,y);
366                  }
367                                          /* copy perimeter (easier) */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines