This is a wrapper around Utah's sun/sky model code. The original paper, "A Practical Analytic Model for Daylight", is at
http://www.cs.utah.edu/vissim/papers/sunsky/ and the authors kindly released the core source code for the method at
http://www.cs.utah.edu/vissim/papers/sunsky/code/
What I've done is add a wrapper that uses the Utah code to draw plots of the entire sky or a specific window of the sky. As a bonus, it draws the CIE diagram, and various spectra, including blackbody and the CIE basis functions.
Building sunsky
The build system requires GNU make. Type 'make' or 'gmake' and follow the instructions. You can then make any necessary build tweaks to makefiles/config.mf.
The sunsky program as set up requires libtiff, but if you don't have it, you can build without TIFF support by removing the GCL_TIFF flag from src/Makefile. Any images saved will then be saved in PPM format.
sunsky requires VL, a vector/matrix library. You can get it from
http://www.cs.cmu.edu/~ajw/software/
NOTE: on some irix systems, the CC compiler can't handle some of the code in SunSky.cc at optimisation level -O2; the fix is to edit makefiles/config.mf and change it to -O1.
Author
Please send any problems, questions, bugs, or suggested improvements to Andrew Willmott <ajw+code@cs.cmu.edu>
NOTE: the sun/sky code, most notably SunSky.cc and SunSkyConstants.cc, is copyright Brian Smits; the LICENSE file does not apply to them. See the original web site for details.
