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.5 by greg, Fri Oct 4 18:11:52 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 177 | Line 180 | double La;
180          };
181          double  l10La;
182          register int    i;
183 <                                        /* interpolate/extrapolate data */
183 >                                        /* check limits */
184 >        if (La <= 7.85e-4)
185 >                return(resfreq[0]);
186 >        if (La >= 1.78e3)
187 >                return(resfreq[NPOINTS-1]);
188 >                                        /* interpolate data */
189          l10La = log10(La);
190          for (i = 0; i < NPOINTS-2 && l10lum[i+1] <= l10La; i++)
191                  ;
# Line 355 | Line 363 | initacuity()                   /* initialize variable acuity sampling
363                          }
364                          fcross(cp, diffx, diffy);
365                          omega = 0.5 * sqrt(DOT(cp,cp));
366 <                        tsampr(x,y) = PI/180. / sqrt(omega) /
367 <                                        hacuity(plum(fovscan(y)[x]));
368 <                        if (tsampr(x,y) > maxsr)
366 >                        if (omega <= FTINY)
367 >                                tsampr(x,y) = 1.;
368 >                        else if ((tsampr(x,y) = PI/180. / sqrt(omega) /
369 >                                        hacuity(plum(fovscan(y)[x]))) > maxsr)
370                                  maxsr = tsampr(x,y);
371                  }
372                                          /* copy perimeter (easier) */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines