//POV-RAy source for a waterfall //by Kurt Bangert //http://www.travelnotes.de/rays/ //use Antialiasing global_settings { max_trace_level 50 } #declare r1 = seed(6); #declare step=1; #include "colors.inc" #include "textures.inc" #include "stones.inc" #include "details.inc" //light_source and camera light_source { <30, 50, -20> color rgb<1.2,1.2,1.2> } camera {location <0,20,-45> look_at <0,29,0>} //mountains object {box{<-500,0,87><500,70,100>} pigment{Green*.5}} object {box{<-500,0,87><-36,75,100>} pigment{Green*.5}} object {box{<12,0,87><500,75,100>}pigment{Green*.5}} //waves object {box{<-500,0,-500><500,14,500>} normal {bumps 0.2 scale 2 } pigment {Blue*.5} finish {ambient 0.3 diffuse 0.2 reflection 0.5}} //the waterfall //a blue stretched cylinder as a background object {cylinder{<-36,0,0><12,0,0> 1 scale <1,70,4> translate <0,0,87>} texture{ pigment {color rgb<.3, .3, .5>} normal{bumps 1 scale <0.5, 2, 0.5>} finish {ambient 0.5 reflection 0.3} }no_shadow} #declare half_sphere = difference{ object{sphere{<0,0,0> 1 hollow }} object{sphere{<0,0,0> 1 scale <1, 1, .5>hollow }} object{box{<-2,-2,0><2,2,2>}} } //waterfall columns (ellipsoids) with media "water_1" #declare i=0; #declare fall1 = union { #while (i<8) #declare px=i*5+(rand(r1)-.5)*4+2; object{half_sphere hollow scale pigment {color rgbt<1, 1, 1, .99>} interior {media {water_2 scale <1,2+rand(r1)*2, 1> rotate -x*30 translate <0, 1, 0> }} hollow no_shadow translate } #declare i=i+step; #end } object{fall1 translate <-35,0,84> } //waterfall ellipsoids with media "water_1" #declare i=0; #declare fall2 = union { #while (i<36) #declare px=i*1.3+(rand(r1)-.5)*2; object{sphere { <0,0,0> 1 scale pigment {color rgbt<1, 1, 1, .99>} interior {media {water_1 scale translate <0, rand(r1)*5, 0>}} hollow} translate } #declare i=i+step; #end //two additional coulumns for the left and right margin of the fall #declare px=-1; object{sphere { <0,0,0> 1 scale <4, 69, 3> pigment {color rgbt<1, 1, 1, .99>} interior {media {water_1 scale <3, 3, 3>}} hollow} translate } #declare px=12+35; object{sphere { <0,0,0> 1 scale <4, rand(r1)*1.5+68, 3> pigment {color rgbt<1, 1, 1, .99>} interior {media {water_1 scale <2, 3, 2>}} hollow} translate } } object{fall2 translate <-35,0,84> } #declare spray = object{half_sphere hollow scale <6, 32, 3> pigment {color rgbt<1, 1, 1, .99>} interior {media {water_3 scale <4,6, 8> translate <0, 1, 0> }} hollow no_shadow translate <7, 0, 0>} object{spray rotate z*90 translate <-12,6,79> } object{spray rotate z*90 scale <.1,1.4,1> translate <-17,6,78> } object{spray rotate z*90 scale <.1,1,1> translate <-35,6,78> } object{spray rotate z*90 scale <.1,1,1> translate <12,6,78> } // bubbling water underneath the fall, just spheres with a texture #declare i=0; #while (i<72) #declare scale_y=(rand(r1)-.5)*2; object{sphere { <0,0,0> 1 scale pigment {color rgbt<1, 1, 1, .99>} texture {watertex_1 scale <1,1,1> } hollow} no_shadow translate <-36+rand(r1)*48,14 ,83-rand(r1)*20>} #declare i=i+1; #end