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

Comparing ray/src/rt/ambient.c (file contents):
Revision 2.23 by greg, Sat Dec 18 10:37:01 1993 UTC vs.
Revision 2.25 by greg, Thu Jun 2 11:45:27 1994 UTC

# Line 59 | Line 59 | int  ar;
59          ambres = ar < 0 ? 0 : ar;               /* may be done already */
60                                                  /* set min & max radii */
61          if (ar <= 0) {
62 <                minarad = 0.0;
62 >                minarad = 0;
63                  maxarad = thescene.cusize / 2.0;
64          } else {
65                  minarad = thescene.cusize / ar;
66 <                maxarad = 16.0 * minarad;               /* heuristic */
66 >                maxarad = 16 * minarad;                 /* heuristic */
67                  if (maxarad > thescene.cusize / 2.0)
68                          maxarad = thescene.cusize / 2.0;
69          }
70 <        if (maxarad <= FTINY)
71 <                maxarad = .001;
70 >        if (minarad <= FTINY)
71 >                minarad = 10*FTINY;
72 >        if (maxarad <= minarad)
73 >                maxarad = 64 * minarad;
74   }
75  
76  
# Line 351 | Line 353 | int  creat;
353   #endif
354          setbuf(ambfp, bmalloc(BUFSIZ+8));
355          if (creat) {                    /* new file */
356 +                newheader("RADIANCE", ambfp);
357                  fprintf(ambfp, "%s -av %g %g %g -ab %d -aa %g ",
358                                  progname, colval(ambval,RED),
359                                  colval(ambval,GRN), colval(ambval,BLU),

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines