//Description: // Sierpinski Recursion // at high iteration levels, // a Sierpinski triangle is approximated //Author: Ben Scheele //Date: 4-15-2002 camera { location <1.5,17,-65> look_at <1.5,7,0> angle 40 rotate -30*y } light_source{ <50,300,-100> rgb 1 } light_source{ <-50,-300,100> rgb .4 } sphere{ 0 1 hollow scale 5000 texture{ pigment{ wrinkles scale <100,20,100>*10 turbulence .5 warp { turbulence 1.0 octaves 1.5 lambda 10.5 omega .5 } color_map{ [0 rgb <.3,.3,.8>] [.8 rgb <1.0,1.2,1.0>] [.85 rgb <1.0,1.3,1.0>] } } } } #macro Recursion(lev,rad) sphere{ 0, rad pigment{ rgb <.3,.1*(lev*1.15),.5> } finish{ diffuse .91 ambient .5 metallic .3 specular .1 roughness .02 reflection .12 } } #local n = .5; #if (lev < maxlev) union{ Recursion(lev+1,rad*n) translate <0,rad*(1+n),0> } union{ Recursion(lev+1,rad*n) translate } union{ Recursion(lev+1,rad*n) translate <0,0,-rad*(1+n)> } #end #end #declare maxlev = 10; Recursion (0,7.5)