//sky_sphere{pigment{gradient y color_map{[0 rgb .6][.15 rgb .5][.45 rgb .2][.55 rgb .1][.7 rgb 0]} scale 1}} #include "recurse3.inc" camera{location <2,4,7>*.45 look_at y*.5} //camera{orthographic location <0,0,-10> look_at 0 up y*.75*5.5 right x*5.5 rotate -y*90 translate y} #declare LPos=<0,45,80>; light_source{LPos color 1 spotlight point_at 2*y falloff 4 radius 3 //area_light vnormalize(vcross(LPos-2*y,x)),vnormalize(vcross(LPos-2*y,y)),3,3 } //Number of points #declare N=2; //Example point (PO) and direction (DO) arrays #declare PO=array[N]{vrotate(-x,-z*60),vrotate(x,z*60)} //#declare PO=array[N]{vrotate(vrotate(-x,z*30),<0,60,0>), // vrotate(vrotate(-x,z*30),<0,60+120,0>), // vrotate(vrotate(-x,z*30),<0,60+240,0>), // y} //#declare PO=array[N]{vrotate(vnormalize(<-1,1,0>)*.5,-z*0),vrotate(y,-z*0)} //#declare DO=array[N]{vrotate(vnormalize(<-1,1,0>)*.5,y*-45),vrotate(y,-z*25)} //#declare PO=array[N]{vrotate(-x,z*-60),vrotate(x,z*60)} //#declare DO=array[N]{vrotate(-x,z*-80),vrotate(x,z*40)} //#declare PO=array[N]{<-1,-1,0>*.5,<1,-1,0>*.5,<1,1,0>*.5,<-1,1,0>*.5} //#declare DO=array[N]{-y,x,y,-x} //Radius of the base object (minor axis in the torus example) //Not necessary, of course. #declare CRad=.05; //Create the base object as cylinders //extending from <0,0,0> to all array points /* #declare C=0; #declare O= union{ #while(C rotate x*-90 translate <0,PO[0].y,PO[0].z> } //Texture of the base object #declare Tex=texture{pigment{average pigment_map{[1 bozo color_map{[.6 rgb .7][.8 rgb <.5,.45,.4>*1.15]} turbulence .3 octaves 8 omega .7 lambda 3 scale .1] [1 granite color_map{[0 rgb <.65,.6,.58>*1.15][1 rgb <.65,.6,.58>*.6*1.15]}]}} finish{ambient .05 brilliance 4 specular .3 roughness .05 metallic 1.5} normal{bozo .05 slope_map{[.7,<1,0>][1,<0,0>]} turbulence .3 scale .1} } //This is the local "up" vector of the fractal; //tilting it to the left makes the fractal curl to the right etc. //#declare CDir=vrotate(y,-z*30); #declare CDir=vrotate(y,x*30); //#declare CDir=y; #declare U=union{Recurse(O, //Base object 0, //Origin CDir, //Local up direction 2/3, //Decrease in size of each consecutive instance PO, //Point array PO, //Direction array (in this case simply use PO) N, //Number of points 6 //Recursion level ) } object{U texture{Tex} rotate -x*30} plane{z,-5 pigment{rgb <.8.3,.5>*.5} finish{ambient 0 crand .15}} union{ cone{-y*.5,.1,0,.08} sphere{0,.1} superellipsoid{<.2,1> scale <.4,.03,.4> translate -y*.5-y*.03} torus{.1,.03 translate -y*.5} texture{Tex} } superellipsoid{<.01,.01> translate -y scale <.5,3,.5> translate y*-.515 pigment{granite color_map{[0 rgb .5][1 rgb <.5,.4,.4>*.5]} turbulence .5 scale .08} finish{specular .1 roughness .06} normal{crackle .5 slope_map{[0,<0,0>][.005,<1,1>][.005,<1,0>]} turbulence .3 scale .3} } height_field{gif "RecursionHF.gif" smooth water_level .1 pigment{rgb <.8,.8,.6>*.9} finish{brilliance 5 specular .3 roughness .03 reflection .3 reflection_exponent .7} translate -y*.1 scale <.5,.01,.25> rotate <-90,180,0> translate <.25,-.9,.5> }