// Persistence of Vision Ray Tracer Scene Description File // File: sky_sphere_alt.pov // Vers: 3.5 // Desc:This is a copy of the sky_sphere example scene from the POV documents with // some alternatives to the application of the sky color gradient to the sky_sphere. // Date:Feb. 3, 2002 // Auth:Abe Madey (bullfrog@taconic.net) //************************************** //Scene switches #declare Example = 0; //0=original scene, 1=gradient normalized above XZ plane, 2=same as #1 but with function. #declare SkyColor = 0; //0=original, 1=alternative (only applied to examples 1 and 2 //************************************** #version 3.5 #include "colors.inc" camera { location <0, 1, -4> look_at <0, 2, 0> angle 80 } light_source { <10, 10, -10> White } sphere { 2*y, 1 pigment { color rgb <1, 1, 1> } finish { ambient 0.2 diffuse 0 reflection 0.6 } } #if(Example=0) sky_sphere { pigment { gradient y color_map { [0 color Red] [1 color Blue] } scale 2 translate -1 } } #end #declare Horizon_Haze = rgb .65; #declare Horizon_Blue = rgb <0.80469, 0.80469, 0.99609>; #declare Zenith_Blue = rgb <0.30078, 0.30078, 0.59766>; #if (SkyColor=0) #declare HorizonColor = color Red; #declare SkyColorMap = color_map{[0 color Red][1 color Blue]} #else #declare HorizonColor = Horizon_Haze; #declare SkyColorMap = color_map{[0 Horizon_Haze][.1 Horizon_Blue][1 Zenith_Blue]} #end //First alternative example #if (Example=1) sky_sphere { pigment { gradient y pigment_map { [0.5 color HorizonColor] [0.5 gradient y color_map{SkyColorMap } translate 1 scale .5 ] } scale 2 translate -1 } } #end #if (Example=2) sky_sphere { pigment { function{min(1,max(0,y))} color_map{SkyColorMap} } } #end