#include "colors.inc" // Standard Color definitions #include "textures.inc" // Standard Texture definitions #declare use_radio = true; global_settings { assumed_gamma 2.2 ambient_light 1 max_trace_level 256 #if (use_radio) radiosity { pretrace_start 0.08 // start pretrace at this size pretrace_end 0.04 // end pretrace at this size count 50 // higher -> higher quality (1..1600) [35] nearest_count 5 //7 //5 // higher -> higher quality (1..10) [5] error_bound 1.8 // higher -> smoother, less accurate [1.8] recursion_limit 3 // how much interreflections are calculated (1..5+) [3] low_error_factor .5 // reduce error_bound during last pretrace step gray_threshold 0.0 // increase for weakening colors (0..1) [0] minimum_reuse 0.015 // reuse of old radiosity samples [0.015] brightness .1 //.25 //1 // brightness of radiosity effects (0..1) [1] adc_bailout 0.01/2 normal on // take surface normals into account [off] //media on // take media into account [off] //save_file "file_name" // save radiosity data //load_file "file_name" // load saved radiosity data //always_sample off // turn sampling in final trace off [on] //max_sample 1.0 // maximum brightness of samples } #end } #declare TallCamera=camera { location <0,4,-8> up <0, 1, 0> right <.66, 0, 0> look_at<0,3,0> right } #declare Norm=camera { location <0,4,-8> look_at<0,3,0> //rotate<90,0,0> } #declare CameraVase=camera { location <0,2,-4> look_at<0,1,0> right } #declare CloseUp=camera { location <0,8,-8> look_at<0,3,0> right } camera { TallCamera } //camera { Norm } //camera { CloseUp } //camera { CameraVase } light_source { <2000,2000,-2000> color White } //light_source { <-2000,2000,-2000> color White } //light_source { <0,2,-2000> color White } background { color White } #declare FlowerWhite=texture { pigment { color White } finish { Glossy ambient .25 } } #declare StemTex=texture { pigment { color White } finish { Glossy ambient .4 } } #declare VaseTex=texture { pigment { color rgbf <1,1,1,.9> } finish { ambient 0.5 diffuse 0.1 brilliance 10 reflection 0.1 refraction 0.9 ior 1.45 specular 0.8 roughness 0.0003 phong 1 phong_size 400 } } #declare LiquidTex=texture { pigment { rgbf<.30,.30,1,.9> } // neon blue //pigment { rgbf<1,.43,.78,.9> } // neon pink finish { ambient 0.5 diffuse 0.1 brilliance 10 reflection 0.1 refraction 0.9 ior 1 specular 0.8 roughness 0.0003 phong 1 phong_size 400 } } #declare RND1=seed(145); #declare Pedal=blob { #declare x1=0; #declare y1=0; #declare z1=0; #declare r1=1; #declare n1=.2; #declare d=2; #declare s1=0; #declare s=sin(s1)*8+2; //blob { //threshold 10 threshold .6 sphere { ,r1,r1 scale<1,1,s> } sphere { ,r1/2,-(r1/2) scale<1,1,s/2> } sphere { ,r1,-r1 scale<1,1,s> } #declare Count=0; #while (Count<35) #declare x2=sin(n1)/d; #declare y2=y1+.125; #declare z2=z1; #declare s=sin(s1)*8+2; #declare r2=r1-.02; //cone { ,r1,,r2 } sphere { ,r2,r2 scale<1,1,s>} sphere { ,r2/2,-(r2/2) scale<1,1,s/2>} sphere { ,r2,-r2 scale<1,1,s/2> } #declare x1=x2; #declare y1=y2; #declare z1=z2; #declare r1=r2; #declare n1=n1+.2; #declare d=d+.1; #declare s1=s1+.01; #declare Count=Count+1; #end sturm //scale <1,1,3> texture { FlowerWhite } rotate<0,180,0> rotate<0,0,90> scale <1,.5,1> scale .2 //texture { Polished_Chrome } } //object { Pedal } //object { Pedal translate<-2,0,0> } //object { Pedal rotate<0,90,0> translate<2,0,0> } #declare LeafTex=texture { pigment { color White } finish { Glossy ambient .25 } /* normal { bump_map { gif "leafnew.gif" // the file to read (iff/gif/tga/png/sys) map_type 0 // 0=planar, 1=spherical, 2=cylindrical, 5=torus interpolate 2 // 0=none, 1=linear, 2=bilinear, 4=normalized distance once bump_size 1.5 } } */ } #declare Leaf=object { difference { cylinder { <0,2,-1.5>,<0,2,1.5>,2 } cylinder { <0,2,-2>,<0,2,2>,1.99 } box { <-100,-100,-100>,<100,3.5,100> } box { <-100,-100,-100>,<100,100,-1.25> } box { <-100,-100,1.25>,<100,100,100> } //texture { pigment { rgbf<0,0,0,1> } } } texture { //pigment { //color White //image_map { material_map { gif "leafsmooth.gif" // the file to read (iff/gif/tga/png/sys) map_type 0 // 0=planar, 1=spherical, 2=cylindrical, 5=torus interpolate 2 // 0=none, 1=linear, 2=bilinear, 4=normalized distance //filter 1,1 //transmit 1,1 once //texture { pigment { rgbft<0,0,0,1,1> } } //texture { pigment { rgbft<0,0,0,1,1> } } //texture { pigment { rgbft<0,0,0,1,1> } } //texture { pigment { rgbft<0,0,0,1,1> } } //texture { pigment { rgbft<0,0,0,1,1> } } //texture { pigment { rgbft<0,0,0,1,1> } } //texture { pigment { rgbft<0,0,0,1,1> } } //texture { LeafTex } //texture { LeafTex } //texture { LeafTex } //texture { LeafTex } texture { LeafTex } texture { LeafTex } texture { pigment { rgbft<0,0,0,1,1> } } texture { LeafTex } //texture { LeafTex } //texture { LeafTex } //texture { LeafTex } } // image_map //} /* normal { bump_map { gif "leaf3.gif" // the file to read (iff/gif/tga/png/sys) map_type 0 // 0=planar, 1=spherical, 2=cylindrical, 5=torus interpolate 2 // 0=none, 1=linear, 2=bilinear, 4=normalized distance once bump_size 5 } } finish { Glossy } */ translate<-.5,-.5,-.5> rotate<90,0,0> scale 3 } //rotate<0,-30,0> translate<1.2,-3.6,0> } #declare Stem=union { union { #declare x1=0; #declare y1=0; #declare z1=0; #declare r1=.15; #declare n1=.2; #declare d=2; sphere { ,r1 } #declare Count=0; #while (Count<40) //#declare x2=x1+(rand(RND1)*.5+-.25) #declare x2=sin(n1)/d; #declare y2=y1+.125; //#declare z2=z1+(rand(RND1)*.5+-.25) //#declare z2=z1 #declare z2=sin(n1)/d; //#declare z2=0 #declare r2=r1-.003; cone { ,r1,,r2 } sphere { ,r2 } #if (Count=30) object { Leaf scale .5 rotate<0,180,0> rotate<-30,0,0> translate } #end #if (Count=28) object { Leaf scale .5 rotate<-20,0,0> rotate<0,0,-10> translate } #end #declare x1=x2; #declare y1=y2; #declare z1=z2; #declare r1=r2; #declare n1=n1+.2; #declare d=d+.1; #declare Count=Count+1; #end texture { StemTex } } // draw flower union { sphere { ,.3 translate<-x1,-y1,-z1> scale <1,.4,1> translate } //pigment { color Red } } #declare Count=0; #while (Count<360) #declare Rot=Count+(-10+rand(RND1)*10); object { Pedal rotate<0,0,-(10+rand(RND1)*5)> translate<-.3,0,0> rotate<0,Rot,0> translate } #declare Count=Count+36; #end texture { FlowerWhite } translate<-x1,-y1,-z1> rotate<-60,0,0> rotate<0,-30,0> translate texture { FlowerWhite } } } #declare Vase=merge { union { #declare x1=0; #declare y1=0; #declare z1=0; #declare r1=1.1; #declare n1=.2; #declare sr1=.01; #declare d=2; #declare b=1.5; //sphere { ,r1 } #declare Count=0; #while (Count<20) #declare x2=sin(n1)/d; #declare y2=y1+.125; #declare z2=z1; #declare r2=r1-.03; #if(Count=14) sphere { ,sr1 } #end #if(Count=12) sphere { ,sr1 } #end #if(Count=10) sphere { ,sr1 } #end #if(Count=8) sphere { ,sr1 } #end #if(Count=6) sphere { ,sr1 } #end #if(Count=4) sphere { ,sr1 } #end #if(Count=2) sphere { ,sr1 } #end #declare x1=x2; #declare y1=y2; #declare z1=z2; #declare r1=r2; #declare n1=n1+.2; #declare d=d+.1; #declare sr1=sr1+.01; #declare Count=Count+1; #end } difference { blob { #declare x1=0; #declare y1=0; #declare z1=0; #declare r1=1.1; #declare n1=.2; //#declare sr1=.1 #declare d=2; threshold 2 sphere { ,r1/2,-r1*3 } sphere { ,r1,r1 } #declare Count=0; #while (Count<20) #declare x2=sin(n1)/d; #declare y2=y1+.125; #declare z2=z1; #declare r2=r1-.03; sphere { ,r2,r2 } //sphere { ,sr1,sr1 } #declare x1=x2; #declare y1=y2; #declare z1=z2; #declare r1=r2; #declare n1=n1+.2; #declare d=d+.1; // #declare sr1=sr1+.04 #declare Count=Count+1; #end } box { <-100,y1-r1,-100>,<100,100,100> } blob { #declare x1=0; #declare y1=0; #declare z1=0; #declare r1=.825; #declare n1=.2; #declare d=2; threshold 2 sphere { ,r1/2,-r1*3 } sphere { ,r1,r1 } #declare Count=0; #while (Count<30) #declare x2=sin(n1)/d; #declare y2=y1+.125; #declare z2=z1; #declare r2=r1-.015; sphere { ,r2,r2 } #declare x1=x2; #declare y1=y2; #declare z1=z2; #declare r1=r2; #declare n1=n1+.2; #declare d=d+.1; #declare Count=Count+1; #end } } // base of vase difference { sphere { <-.18,-.7,0>,.75 } sphere { <0,0,0>,.65 scale <1,.5,1> translate<-.18,-.7,0> } box { <-100,-100,-100>,<100,-.7,100> } } texture { VaseTex } //texture { pigment { color White } } //texture { FlowerWhite } //texture { pigment { rgbf<0,0,1,.9> } } } #declare R1=seed(567); #declare VaseLiquid=difference { blob { #declare x1=0; #declare y1=0; #declare z1=0; #declare r1=.825; #declare n1=.2; #declare d=2; threshold 2 sphere { ,r1/2,-r1*3 } sphere { ,r1,r1 } #declare Count=0; #while (Count<30) #declare x2=sin(n1)/d; #declare y2=y1+.125; #declare z2=z1; #declare r2=r1-.015; sphere { ,r2,r2 } #declare x1=x2; #declare y1=y2; #declare z1=z2; #declare r1=r2; #declare n1=n1+.2; #declare d=d+.1; #declare Count=Count+1; #end } box { <-100,1,-100>,<100,100,100> } #declare Count=0; #while (Count<240) #declare x1=-.25+rand(R1)*1; #declare y1=rand(R1)*1; #declare z1=-.4125+rand(R1)*.825; #declare r1=.05*rand(R1)*.4; sphere { ,r1 } #declare Count=Count+1; #end texture { LiquidTex } scale .99 } #declare gnd=plane { y,0 texture { FlowerWhite finish { ambient .4 } } } #declare Mysky = sphere { <0,0,0>,0.98 texture { Blue_Sky3 finish {reflection 0.0 diffuse 0.0 ambient 1.0} } } #declare FSky=difference { sphere { <0,0,0>,1} object {Mysky} scale <3000,500,3000> texture { Blue_Sky3 finish {reflection 0.0 diffuse 0.0 ambient 1.0} } no_shadow } #declare HalfVase=difference { object { Vase } box { <-100,-100,-100>,<100,100,0> } pigment { color White } } union { object { Stem } object { Vase } object { VaseLiquid } //object { HalfVase } translate<0,.7,0> } fog { color White distance 1550 } object { gnd } object { FSky }