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.4 by greg, Sun Jan 20 01:16:15 2013 UTC vs.
Revision 2.6 by greg, Fri Jan 25 23:17:31 2013 UTC

# Line 494 | Line 494 | main(int argc, char *argv[])
494                  fprintf(stderr, "%s: done.\n", progname);
495          exit(0);
496   userr:
497 <        fprintf(stderr, "Usage: %s [-v][-d|-s][-m N][-g refl][-c r g b][-o{f|d}] [tape.wea]\n",
497 >        fprintf(stderr, "Usage: %s [-v][-d|-s][-m N][-g r g b][-c r g b][-o{f|d}] [tape.wea]\n",
498                          progname);
499          exit(1);
500   fmterr:
# Line 521 | Line 521 | ComputeSky(float *parr)
521          /* Calculate atmospheric precipitable water content */
522          apwc = CalcPrecipWater(dew_point);
523  
524 <        /* Limit solar altitude to keep circumsolar off zenith */
525 <        if (altitude > DegToRad(87.0))
526 <                altitude = DegToRad(87.0);
527 <
528 <        /* Calculate sun zenith angle */
529 <        sun_zenith = DegToRad(90.0) - altitude;
524 >        /* Calculate sun zenith angle (don't let it dip below horizon) */
525 >        /* Also limit minimum angle to keep circumsolar off zenith */
526 >        if (altitude <= 0.0)
527 >                sun_zenith = DegToRad(90.0);
528 >        else if (altitude >= DegToRad(87.0))
529 >                sun_zenith = DegToRad(3.0);
530 >        else
531 >                sun_zenith = DegToRad(90.0) - altitude;
532  
533          /* Compute the inputs for the calculation of the sky distribution */
534          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines