// Last edited on 2009-07-22 16:46:22 by stolfilocal
// Processed by remove-cam-lights

background{ color rgb < 0.75, 0.80, 0.85 > }

#declare tinta_A = 
  texture {
    pigment { color rgb < 0.20, 1.00, 0.20 > }
    finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 }
  }

#declare tinta_B = 
  texture {
    pigment { color rgb < 1.00, 1.00, 0.20 > }
    finish { diffuse 0.8 specular 0.0 ambient 0.2 }
  }

#declare s=1/3;
  
#macro siep( n )
 
#if (n = 0)
  sphere { 
   <0.0.0>, 6  
   texture { tinta_A }
 }
 #else
  union {
    difference {
      sphere { 
        <0.0.0>, 6 
        texture { tinta_A }
      }
      union {
        sphere {
          < 0,4,0 > , 3
          texture { tinta_A }
        }
        sphere {
          < 0,4,0 > , 3
          texture { tinta_A }
        }

        sphere {
          < 4,0,0 > , 3
          texture { tinta_A }
        }

        sphere {
          < -2.8,-2.8,-2.8 > , 3
          texture { tinta_A }
        }
      }
    }
    union {
      object {siep (n-1) scale 0.25 translate <0,0,4>}
      object {siep (n-1) scale 0.25 translate <0,4,0>}
      object {siep (n-1) scale 0.25 translate <4,0,0>}
      object {siep (n-1) scale 0.25 translate <-2.8,-2.8,-2.8>}
    }
  }
#end
#end

#declare N = 4;

intersection{
  object {siep (N)}
  union{
    plane{ x,0 }
    plane{ y,0 }
    plane{ z,0 } 
    texture{ tinta_B }
  }
}

// Original camera parameters:
// #local cam_ctr = <0,0,0>
// #local cam_vec = <15.00,13.00,7.00>
// #local cam_sky = z

#include "camlight.inc"
camlight(<0,0,0>,<10,8,7>,17.0,z,1.0)