// Hans-Jakob Schwer // povray 3.6 scenefile //#include "colors.pov" #include "colors.inc" #include "textures.inc" #include "shapes.inc" #include "metals.inc" #include "glass.inc" #include "woods.inc" // main objects and settings global_settings {max_trace_level 14} camera { location <-48.2*0.4, 48*0.4, +45*0.4> look_at <0.001,0.001,0.001> } #declare Dist=80.0; // light distance // lights light_source {< 0, -40, 0> color Red fade_distance Dist fade_power 2 } light_source {< -50, 55, -50> color Orange fade_distance Dist fade_power 2 } light_source {< 30, 40, 33> color White fade_distance Dist fade_power 2 } light_source {< -15, -30, 40> color Blue fade_distance Dist fade_power 2 } // color map for texture #declare M_Wood18B = colour_map { [0.00 0.25 color rgbf < 0.30, 0.46, 0.42, 0.10> color rgbf < 0.34, 0.49, 0.43, 0.20>] [0.25 0.40 color rgbf < 0.34, 0.39, 0.33, 0.20> color rgbf < 0.35, 0.48, 0.40, 0.70>] [0.40 0.50 color rgbf < 0.00, 0.38, 0.40, 0.70> color rgbf < 0.30, 0.43, 0.35, 0.95>] [0.50 0.70 color rgbf < 0.30, 0.43, 0.35, 0.95> color rgbf < 0.36, 0.39, 0.47, 0.70>] [0.70 0.98 color rgbf < 0.36, 0.39, 0.87, 0.70> color rgbf < 0.00, 0.29, 0.33, 0.20>] [0.98 1.00 color rgbf < 0.00, 0.00, 1.00, 1.00> color rgbf < 0.0, 0.0, 0.0, 0.70>] } #declare Floor_Texture = texture { pigment { P_WoodGrain18A color_map { M_Wood18A }}} texture { pigment { P_WoodGrain12A color_map { M_Wood18B }}} texture { pigment { P_WoodGrain12B color_map { M_Wood18B }} finish { reflection 0.25 } } // floor plane #declare Floor = plane { y,0 texture { pigment { crackle scale 1.5 turbulence 0.6 color_map { M_Wood18B } // end of color_map scale 2.0 } // end of pigment finish { diffuse 0.2 phong 0.3 } scale 1.1 rotate y*90 rotate <10, 0, 15> translate <0, -5, 0> } // end of texture ----------------------- translate <0, -10, 0> } // main function #macro rek2(stufe, x_, y_, z_, x2_, y2_, z2_,ori, init_) #if(init_ = 0) object { #if(stufe > 4) // the box-object box { , texture{ Floor_Texture } } #else box { , texture{ T_Glass2 } interior {I_Glass caustics 1} } #end } #end // the recursive part, the boxes are placed by some simple // rules with the help of the modulo-Operator (mod(n)) // the orientation of the boxes is given by ori #if(stufe > 0) #local dx = x2_ - x_; #local dy = y2_ - y_; #local dz = z2_ - z_; #local dxv = dx * 0.1; #local dyv = dy * 0.1; #local dzv = dz * 0.1; #if(ori = 0) rek2(stufe-1, x_+dxv, y_-dy, z_+dzv, x2_-dxv, y2_-dy, z2_-dzv,0,0) #if(mod(stufe,7) = 0) rek2(stufe-3,x_,y_,z_,x2_,y2_,z2_,2,1) rek2(stufe-3,x_,y_,z_,x2_,y2_,z2_,3,1) rek2(stufe-3,x_,y_,z_,x2_,y2_,z2_,4,1) rek2(stufe-3,x_,y_,z_,x2_,y2_,z2_,5,1) #end #end #if(ori = 1) rek2(stufe-1, x_+dxv, y_+dy, z_+dzv, x2_-dxv, y2_+dy, z2_-dzv,1,0) #if(mod(stufe,7) = 0) rek2(stufe-3,x_,y_,z_,x2_,y2_,z2_,2,1) rek2(stufe-3,x_,y_,z_,x2_,y2_,z2_,3,1) rek2(stufe-3,x_,y_,z_,x2_,y2_,z2_,4,1) rek2(stufe-3,x_,y_,z_,x2_,y2_,z2_,5,1) #end #end #if(ori = 2) rek2(stufe-1, x_+dx, y_+dyv, z_+dzv, x2_+dx, y2_-dyv, z2_-dzv,2,0) #if(mod(stufe,5) = 0) rek2(stufe,x_,y_,z_,x2_,y2_,z2_,0,1) rek2(stufe,x_,y_,z_,x2_,y2_,z2_,1,1) #end #end #if(ori = 3) rek2(stufe-1, x_-dx, y_+dyv, z_+dzv, x2_-dx, y2_-dyv, z2_-dzv,3,0) #if(mod(stufe,5) = 0) rek2(stufe,x_,y_,z_,x2_,y2_,z2_,0,1) rek2(stufe,x_,y_,z_,x2_,y2_,z2_,1,1) #end #end #if(ori = 4) rek2(stufe-1, x_+dxv, y_+dyv, z_+dz, x2_-dxv, y2_-dyv, z2_+dz,4,0) #if(mod(stufe,4) = 0) rek2(stufe,x_,y_,z_,x2_,y2_,z2_,0,1) rek2(stufe,x_,y_,z_,x2_,y2_,z2_,1,1) #end #end #if(ori = 5) rek2(stufe-1, x_+dxv, y_+dyv, z_-dz, x2_-dxv, y2_-dyv, z2_-dz,5,0) #if(mod(stufe,4) = 0) rek2(stufe,x_,y_,z_,x2_,y2_,z2_,0,1) rek2(stufe,x_,y_,z_,x2_,y2_,z2_,1,1) #end #end #end #end // glass-box #macro xquad(x_,y_,z_,size_, wanddicke) object { box { , texture{ T_Glass2 } interior {I_Glass caustics 1} } } #end object // midle object { #union { #local tt = 25; #local h = 1; #local j = 0.3; #local k = 1; rek2(tt,h,j,k,-h,-j,-k,0,0) rek2(tt,h,j,k,-h,-j,-k,1,0) rek2(tt,h,j,k,-h,-j,-k,2,0) rek2(tt,h,j,k,-h,-j,-k,3,0) rek2(tt,h,j,k,-h,-j,-k,4,0) rek2(tt,h,j,k,-h,-j,-k,5,0) } } // glass-box for mirror-effect, camera and main object are inside object { #union { #local x_ = 0; #local y_ = 0; #local z_ = 0; #local size_ = 40; #local wanddicke = 0.1; xquad(x_, y_, z_, size_, wanddicke) } }