/* Media test scene */ camera { perspective location <-4,0,1> up y right 4*x/3 angle 60 sky <0,0,1> look_at <1,0,1> } /* light source directly above the media sphere */ light_source { <0,0,4> color rgb <1.0,1.0,1.0> } light_source { <0.5,0,1> color rgb <1.0,1.0,1.0> } /* Ground plane */ plane { <0,0,1>, 0 texture { pigment { color rgb <0.8,0.8,0.4> } normal { crackle 1 turbulence 0.4 scale 0.2 } } } /* Some sky colour variation */ sky_sphere { pigment { gradient z color_map { [ 0 color <0.9,0.9,1.0> ] [ 1 color <0.0,0.0,1.0> ] } scale 2 translate -1 } } /* Marker posts behind the media */ #declare ypos = -2; #while (ypos < 2.1) cylinder { <2,ypos,0>, <2,ypos,1.25>, 0.04 pigment { color <1,1,1> } } #declare ypos = ypos + 0.5; #end /* Markers within the media */ #declare ypos = -1.75; #while (ypos < 2) sphere { <0,ypos,1>, 0.05 pigment { color <1,1,1> } } #declare ypos = ypos + 0.5; #end /* Finally, the media within a sphere */ sphere { <0,0,0>, 1 hollow texture { pigment { rgbt <1,1,1,1> } finish { ambient 0 diffuse 0 } } interior { media { intervals 30 ratio 0.9 samples 2,4 confidence 0.9 variance 1.0/128.0 method 1 absorption <0,0,0> emission <0,0,0> scattering { 1, <0,0,0> extinction 0 } density { spherical density_map { [0.0 color rgb 0 ] [1.0 color rgb 1 ] } } } } translate <0,0,1> }