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

Comparing ray/src/gen/mkillum3.c (file contents):
Revision 2.14 by greg, Thu Sep 15 22:34:41 2016 UTC vs.
Revision 2.15 by greg, Sat Dec 16 18:35:27 2023 UTC

# Line 8 | Line 8 | static const char RCSid[] = "$Id$";
8   #include  "mkillum.h"
9   #include  "paths.h"
10  
11 #define  brt(col)       (.263*(col)[0]+.655*(col)[1]+.082*(col)[2])
12
11   char    DATORD[] = "RGB";               /* data ordering */
12   char    DATSUF[] = ".dat";              /* data file suffix */
13   char    DSTSUF[] = ".dist";             /* distribution suffix */
# Line 140 | Line 138 | flatout(               /* write hemispherical distribution */
138                  fprintf(dfp, "2\n%f %f %d\n%f %f %d\n",
139                                  1.+.5/n, .5/n, n+1,
140                                  0., 2.*PI, m+1);
141 <                brightout(Ninv, 1, m, 1./il->nsamps/brt(il->col), dfp);
142 <                brightout(da, n, m, 1./il->nsamps/brt(il->col), dfp);
141 >                brightout(Ninv, 1, m, 1./il->nsamps/bright(il->col), dfp);
142 >                brightout(da, n, m, 1./il->nsamps/bright(il->col), dfp);
143                  fputeol(dfp);
144                  fclose(dfp);
145                  printf(" %s", dfname(il, 0));
# Line 197 | Line 195 | roundout(                      /* write spherical distribution */
195                  fprintf(dfp, "2\n%f %f %d\n%f %f %d\n",
196                                  1.+1./n, -1.-1./n, n+2,
197                                  0., 2.*PI, m+1);
198 <                brightout(Ninv, 1, m, 1./il->nsamps/brt(il->col), dfp);
199 <                brightout(da, n, m, 1./il->nsamps/brt(il->col), dfp);
200 <                brightout(Sinv, 1, m, 1./il->nsamps/brt(il->col), dfp);
198 >                brightout(Ninv, 1, m, 1./il->nsamps/bright(il->col), dfp);
199 >                brightout(da, n, m, 1./il->nsamps/bright(il->col), dfp);
200 >                brightout(Sinv, 1, m, 1./il->nsamps/bright(il->col), dfp);
201                  fputeol(dfp);
202                  fclose(dfp);
203                  printf(" %s", dfname(il, 0));
# Line 235 | Line 233 | illumout(              /* print illum object */
233                  cout[1] = il->col[1];
234                  cout[2] = il->col[2];
235          } else {
236 <                cout[0] = cout[1] = cout[2] = brt(il->col);
236 >                cout[0] = cout[1] = cout[2] = bright(il->col);
237          }
238          printf("\n0\n3 %f %f %f\n", cout[0], cout[1], cout[2]);
239  
# Line 294 | Line 292 | average(               /* evaluate average value for distribution *
292                  il->col[2] /= (double)il->nsamps;
293          }
294                                          /* brighter than minimum? */
295 <        return(brt(il->col) > il->minbrt+FTINY);
295 >        return(bright(il->col) > il->minbrt+FTINY);
296   }
297  
298  
# Line 357 | Line 355 | brightout(     /* put out brightness distribution data */
355  
356          for (i = 0; i < n; i++) {
357                  for (j = 0; j < m; j++) {
358 <                        fputnum(mult*brt(da), fp);
358 >                        fputnum(mult*bright(da), fp);
359                          da += 3;
360                  }
361 <                fputnum(mult*brt(da-3*m), fp);  /* wrap phi */
361 >                fputnum(mult*bright(da-3*m), fp);       /* wrap phi */
362          }
363   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines