//Description: // opposing pairs rotated // alternates between cubes and spheres // with radiosity and photons //Author: Ben Scheele //Date: 3-16-2002 camera { location <-10,20,-100> look_at 0 angle 4.75 } #declare rad = 1; global_settings{ #if(rad = true) radiosity{ pretrace_start 0.08 pretrace_end .01 count 100 nearest_count 5 error_bound 1.5 recursion_limit 3 low_error_factor 0.5 gray_threshold 0.0 minimum_reuse 0.015 brightness 1.0 adc_bailout 0.01/2 } #end photons{ spacing 0.005 } } light_source{ <-40,20,-80> rgb .35 photons{ reflection off refraction on }} light_source{ 200*y rgb .2 photons{ reflection off refraction on }} background{ rgb <.8,.9,1.2> } difference{ cylinder{ <0,-.7,0>, <0,.5,0>, 1 } cylinder{ <0,-.65,0>, <0,.6,0>, .95 } cylinder{ <0,-.65,0>, <0,.6,0>, .75 translate <0,0,-.5> } pigment{ rgb <.9,.9,.93>*.8 } finish{diffuse 1 phong .2 } scale 4 } #macro Recursion(lev,rad) #if( lev > 0 & mod(lev,2) = 1 ) sphere{ 0, rad pigment{ rgb<.4,.2,.7> } photons{ target reflection on refraction off } finish{phong 2 phong_size 80 diffuse .8 metallic .3 specular .3 roughness .1 reflection .15 } } #end #if(lev > 0 & mod(lev,2) = 0) box{ <-rad,-rad,-rad>, pigment{ rgb<.7,.4,.2> transmit .6} interior{ ior 1.5 caustics .4 dispersion .5 } photons{ target reflection off refraction on } finish{ phong 2 phong_size 80 diffuse .8 metallic .3 specular .3 roughness .1 reflection .15 } } #end #local n = .5; #if (lev < lmax) union{ Recursion(lev+1,rad*n) translate rotate 45*z } union{ Recursion(lev+1,rad*n) translate <-rad*(1+n),0,0> rotate -45*z } union { Recursion(lev+1,rad*n) translate <0,0,rad*(1+n)> rotate 45*x } union { Recursion(lev+1,rad*n) translate <0,0,-rad*(1+n)> rotate -45*x } #end #end #declare lmax = 4; Recursion (0,1)