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

Comparing ray/src/gen/gensky.c (file contents):
Revision 1.1 by greg, Thu Feb 2 11:16:29 1989 UTC vs.
Revision 1.5 by greg, Tue Aug 6 08:22:06 1991 UTC

# Line 53 | Line 53 | main(argc, argv)
53   int  argc;
54   char  *argv[];
55   {
56 <        extern double  atof();
56 >        extern double  atof(), fabs();
57          int  i;
58  
59          progname = argv[0];
# Line 102 | Line 102 | char  *argv[];
102                  else
103                          userror("bad option");
104  
105 +        if (fabs(s_meridian-s_longitude) > 30*PI/180)
106 +                fprintf(stderr,
107 +        "%s: warning: %.1f hours btwn. standard meridian and longitude\n",
108 +                        progname, (s_longitude-s_meridian)*12/PI);
109 +
110          printhead(argc, argv);
111  
112          computesky();
# Line 128 | Line 133 | computesky()                   /* compute sky parameters */
133          if (zenithbr <= 0.0)
134                  if (cloudy) {
135                          zenithbr = 8.6*sundir[2] + .123;
136 <                        zenithbr *= 1000.0/683.0;
136 >                        zenithbr *= 1000.0*.0064/3.;
137                  } else {
138                          zenithbr = (1.376*turbidity-1.81)*tan(altitude)+0.38;
139 <                        zenithbr *= 1000.0/683.0;
139 >                        zenithbr *= 1000.0*.0064/3.;
140                  }
141 +        if (zenithbr < 0.0)
142 +                zenithbr = 0.0;
143                                          /* Compute horizontal radiance */
144          if (cloudy) {
145                  groundbr = zenithbr*0.777778;
# Line 157 | Line 164 | computesky()                   /* compute sky parameters */
164  
165   printsky()                      /* print out sky */
166   {
160        register int  i;
161
167          if (dosun) {
168                  printf("\nvoid light solar\n");
169                  printf("0\n0\n");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines