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

Comparing ray/src/gen/gendaymtx.c (file contents):
Revision 2.22 by greg, Fri Oct 30 17:06:34 2015 UTC vs.
Revision 2.23 by greg, Thu Aug 18 00:52:48 2016 UTC

# Line 86 | Line 86 | static const char RCSid[] = "$Id$";
86   #include <string.h>
87   #include <ctype.h>
88   #include "rtmath.h"
89 + #include "rtio.h"
90   #include "resolu.h"
91   #include "platform.h"
92   #include "color.h"
# Line 555 | Line 556 | main(int argc, char *argv[])
556                          break;
557                  case 'f':
558                          for (j = 0; j < ntsteps; j++) {
559 <                                fwrite(mtx_data+mtx_offset, sizeof(float), 3,
559 >                                putbinary(mtx_data+mtx_offset, sizeof(float), 3,
560                                                  stdout);
561                                  mtx_offset += 3*nskypatch;
562                          }
# Line 566 | Line 567 | main(int argc, char *argv[])
567                                  ment[0] = mtx_data[mtx_offset];
568                                  ment[1] = mtx_data[mtx_offset+1];
569                                  ment[2] = mtx_data[mtx_offset+2];
570 <                                fwrite(ment, sizeof(double), 3, stdout);
570 >                                putbinary(ment, sizeof(double), 3, stdout);
571                                  mtx_offset += 3*nskypatch;
572                          }
573                          break;
# Line 1128 | Line 1129 | void CalcSkyPatchLumin( float *parr )
1129          double sspa;                    /* Sun-sky point angle */
1130          double zsa;                             /* Zenithal sun angle */
1131  
1132 + fprintf(stderr, "Alt, azi: %f %f\n", altitude, azimuth);
1133 + fprintf(stderr, "Perez parameters: %f %f %f %f %f\n",
1134 +        perez_param[0], perez_param[1], perez_param[2], perez_param[3], perez_param[4]);
1135 +
1136          for (i = 1; i < nskypatch; i++)
1137          {
1138                  /* Calculate sun-sky point azimuthal angle */
# Line 1142 | Line 1147 | void CalcSkyPatchLumin( float *parr )
1147  
1148                  /* Calculate patch luminance */
1149                  parr[3*i] = CalcRelLuminance(sspa, zsa);
1150 + fprintf(stderr, "CalcRelLuminance(%f, %f) = %f\n", sspa, zsa, parr[3*i]);
1151                  if (parr[3*i] < 0) parr[3*i] = 0;
1152                  parr[3*i+2] = parr[3*i+1] = parr[3*i];
1153          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines