// Scene for views from the sun // Last edited on 2005-08-29 22:58:41 by stolfi global_settings { max_trace_level 10 } // A complete scene with camera and light at the sun's position. // Parameters: // latitude = local latitude (degrees north of equator). // season = season of the year (0.00 to 1.00; 0 = spring equinox) // hour = hour of day (0 to 24). // roof_az = direction of roof's descent (degrees counterclockwise from north). // roof_incl = inclination of roof (degrees from horizontal). // profile = reflector's shape is read from "heater-profile-{profile}.inc". // colltype = collector's shape is read from "collector-{colltype}.inc". #macro scene_sunview(latitude, season, hour, roof_az, roof_incl, profile, colltype) #include "heater.inc" #include "roof-mount.inc" #local heater_rad = heater_radius(profile); #local heater_ht = heater_height(profile); union { object { heater(profile, colltype, 16) rotate -roof_incl*x } object { roof_mount(roof_incl, heater_ht, heater_rad) } rotate -roof_az*z } #include "astronomy.inc" #declare sun_dir = compute_sun_direction(latitude, season, hour); #debug "\n" #debug concat("sun direction = ", str(sun_dir.x,6,3), " ", str(sun_dir.y,6,3), " ", str(sun_dir.z,6,3), "\n") #declare camera_ctr = < 00.000, 00.000, 00.000 >; #declare camera_dir = sun_dir; #declare camera_dst = 500.0; #declare camera_upp = y; #declare scene_radius = 1.200; #include "camera.inc" light_source { 1000 * sun_dir color rgb 1.000 * < 1.000, 1.000, 1.000 > } #end