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

Comparing ray/src/util/findglare.c (file contents):
Revision 1.19 by greg, Fri Apr 19 17:40:59 1991 UTC vs.
Revision 1.22 by greg, Mon Apr 22 14:56:28 1991 UTC

# Line 190 | Line 190 | char   *argv[];
190          fputs(VIEWSTR, stdout);
191          fprintview(&ourview, stdout);
192          printf("\n");
193 <        fputformat("ASCII", stdout);
193 >        fputformat("ascii", stdout);
194          printf("\n");
195          printsources();                         /* print glare sources */
196          printillum();                           /* print illuminances */
# Line 300 | Line 300 | int    x, y;
300          FVECT   org;                    /* dummy variable */
301  
302          hl = hlim(y);
303 <        if (x <= -hl)                   /* left region */
303 >        if (x <= -hl) {                 /* left region */
304 >                if (x <= -hl-sampdens)
305 >                        return(-1);
306                  return(viewray(org, vd, &leftview,
307                                  (double)(x+hl)/(2*sampdens)+.5,
308                                  (double)y/(2*sampdens)+.5));
309 <        if (x >= hl)                    /* right region */
309 >        }
310 >        if (x >= hl) {                  /* right region */
311 >                if (x >= hl+sampdens)
312 >                        return(-1);
313                  return(viewray(org, vd, &rightview,
314                                  (double)(x-hl)/(2*sampdens)+.5,
315                                  (double)y/(2*sampdens)+.5));
316 +        }
317                                          /* central region */
318          if (viewray(org, vd, &ourview, .5, (double)y/(2*sampdens)+.5) < 0)
319                  return(-1);
# Line 330 | Line 336 | int    x, y;
336                  xo = x-hl;
337          else
338                  xo = 0;
339 <        disc = 1. - (xo*xo + y*y)/(sampdens*sampdens);
339 >        disc = 1. - (double)(xo*xo + y*y)/(sampdens*sampdens);
340          if (disc <= FTINY)
341                  return(0.);
342          return(1./(sampdens*sampdens*sqrt(disc)));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines