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

Comparing ray/src/util/glaresrc.c (file contents):
Revision 1.7 by greg, Wed Mar 20 12:18:14 1991 UTC vs.
Revision 1.9 by greg, Thu Mar 21 14:53:56 1991 UTC

# Line 49 | Line 49 | analyze()                      /* analyze our scene */
49                  memerr("view span brightness buffer");
50          for (v = vsize; v >= -vsize; v--) {
51                  close_sources(v);
52 + #ifndef DEBUG
53 +                if (verbose)
54 +                        fprintf(stderr, "%s: analyzing... %3ld%%\r",
55 +                                progname, 100L*(vsize-v)/(2*vsize));
56 + #endif
57                  getviewspan(v, spanbr);
58                  left = hsize + 1;
59                  for (h = -hsize; h <= hsize; h++) {
# Line 87 | Line 92 | double br;
92          register int    i;
93  
94          if (h <= -hlim) {                       /* left region */
95 <                d = (double)(h+hlim)/sampdens;
96 <                if (d <= -1.0+FTINY)
95 >                d = (double)(-h-hlim)/sampdens;
96 >                if (d >= 1.0-FTINY)
97                          return;
98                  tanb = d/sqrt(1.0-d*d);
99                  for (i = 0; i < nglardirs; i++) {
# Line 101 | Line 106 | double br;
106                  return;
107          }
108          if (h >= hlim) {                        /* right region */
109 <                d = (double)(h-hlim)/sampdens;
110 <                if (d >= 1.0-FTINY)
109 >                d = (double)(-h+hlim)/sampdens;
110 >                if (d <= -1.0+FTINY)
111                          return;
112                  tanb = d/sqrt(1.0-d*d);
113                  for (i = 0; i < nglardirs; i++) {
# Line 153 | Line 158 | comp_thresh()                  /* compute glare threshold */
158                  exit(1);
159          }
160          if (verbose) {
161 + #ifdef DEBUG
162                  pict_stats();
163 + #endif
164                  fprintf(stderr,
165                          "%s: threshold set to %f cd/m2 from %d samples\n",
166                                  progname, threshold, nsamps);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines