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

# 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