#include "colors.inc" #include "textures.inc" #default { finish { ambient 0 diffuse 0 } } global_settings { assumed_gamma 1.0 max_trace_level 15 } #declare groundRad = 25000 / (2 * pi); #declare camLookAt = <0, 2.00, 0>; #declare camLoc = <.010, .020, -20.0>; #declare lightDist = 93000000; // 1 pov-unit to 1 mile :-) #declare lightRad = sin(radians(0.5))*lightDist; #declare lightPos = y+z+x; #declare lightPos = vnormalize(vrotate(lightPos, 0*x)) * lightDist; #declare mSamples = 15; // increase for better picture ... gets _very_ slow ~25 #declare atmCol = <0.01, 0.031, 0.1>*0.5; // semi-log ... seems to work. camera { location camLoc direction <0, 0, 1.0> look_at camLookAt } light_source { 0*x color White media_attenuation on translate lightPos translate camLoc - groundRad*y } // for when I add transparency to the water ... sphere { 0, groundRad - 1 pigment { color Brown } finish { Dull } translate -groundRad*y } // an adaptation of the water by Jon S. Brandt. sphere { 0, groundRad texture { pigment { color rgb <80,90,94>/255.0 } finish { diffuse 0.2 ambient 0.05 reflection 1.3 specular 1.5 roughness 0.01 brilliance 0.01 } normal{ bozo normal_map { [ .3 waves translate -0.5 scale <1,.5,1>*100000 frequency 100000] [ .7 ripples translate -0.5 scale <1,.7,1>*100000 frequency 100000] [ .85 ripples translate -0.5 scale <1,.6,1>*100000 frequency 100000] [ 1 ripples translate -0.5 scale 100000 frequency 100000] } scale 0.01 } } translate -groundRad*y } // Start of cloud code ... rather a mess. #declare cloudShape = density { spotted ramp_wave } #declare D_Cloud_Center = density { cloudShape triangle_wave colour_map { [0.5 colour Gray95] [1.0 colour Gray45] } } // Calculate the correct colour_map values. #declare NT = floor((groundRad + 6) / 6); #declare DT = (groundRad + 6) / NT; #declare V1 = 1 - (6 - 2.0) / DT; #declare V2 = 1 - (6 - 2.5) / DT; #declare V3 = 1 - (6 - 3.5) / DT; #declare V4 = 1 - (6 - 4.5) / DT; #declare V5 = 1 - (6 - 5.5) / DT; #declare V6 = 1 - (6 - 6.0) / DT; // container for cloud. difference { sphere { 0, groundRad + 6.0 } sphere { 0, groundRad + 3.5 } pigment { rgbf 1 } interior { media { intervals mSamples scattering { 2, rgb 5 extinction 1.0} samples 2, mSamples confidence 0.9999 variance 1/1000 // fine scale cloud detail density { D_Cloud_Center scale 2*3*0.2 } density { D_Cloud_Center scale 2*3*0.08 } // confine the cloud to the container density { onion colour_map { [V1 rgb 0] [V2 rgb 0] [V3 rgb 0] [V4 rgb 1] [V5 rgb 1] [V6 rgb 0] } scale DT } // large scale cloud detail density { onion colour_map { [V1 rgb 0] [V2 rgb 1] [V3 rgb 1] [V4 rgb 0] [V5 rgb 0] [V6 rgb 0] } warp { turbulence 0.25 octaves 3 lambda 3 omega 0.7 } scale DT } } } translate -groundRad*y hollow } // atmosphere sphere { 0, groundRad + 20.0 pigment { rgbf 1 } interior { media { intervals mSamples scattering { 4, rgb atmCol extinction 1 } samples 2, mSamples confidence 0.9999 variance 1/1000 #declare NT = floor((groundRad + 20.0) / 20.0); #declare DT = (groundRad + 20.0) / NT; #declare V1 = 1 - (20.0 - 5.0) / DT; #declare V2 = 1 - (20.0 - 5.0) / DT; density { onion ramp_wave colour_map { [V1 rgb 1] [V2 rgb 0.5] [1 rgb 0] } } scale DT } } translate -groundRad*y hollow }