// Last edited on 2013-11-04 03:56:45 by stolfilocal
// Processed by remove-cam-lights

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

#declare tx_plastico =
  texture{
    pigment{ color rgb < 0.60, 0.60, 0.60 > }
    finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
  }

#declare tx_amarelo =
  texture{
    pigment{ color rgb < 0.80, 0.80, 0.10 > }
    finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
  }

#declare tx_fosca =
  texture{
    pigment{ color rgb < 0.8, 0.10, 0.10 > }
    finish{ diffuse 0.9 ambient 0.1 }
  }

#declare tx_espelho =
  texture{
    pigment{ color rgb < 1.00, 0.85, 0.30 > }
    finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 }
  }

#declare tx_vidro =
  texture{
    pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 }
    finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 }
  }

#declare tx_xadrez =
  texture{
    pigment{ checker color rgb < 0.60, 0.50, 0.40 >, color rgb < 0.85, 0.7, 0.20 > }
    finish{ diffuse 0.9 ambient 0.1 }
    scale 2.0
  }

#declare raio = 2.000;

#declare spherM =
  sphere { <0,0,0> 1.3 }

#declare spherm =
  sphere { <0,0,0.5> 1.1 }

#declare cilesq =
  cylinder { <-0.0,-1.8,-0.5>, <0,-1.1,0.0>, 0.2 }

#declare cildir =
   cylinder { <-0.0,1.8,-0.5>, <0,1.1,0.0>, 0.2 }

#declare chao =
  box{ <-6,-6,-1>, <+6,+6,0> }

#declare basedir =
  box { <-0.1,1.9,-0.9>,<0.1,1.7,0.1> rotate<0,0,0> }

#declare baseesq =
  box { <-0.1,-1.9,-0.9>, <0.1,-1.7,0.1> rotate<0,0,0>  }

#include "eixos.inc"

union{
  //object{ eixos(3.00) }

  object{ chao  translate < 0,0,-5 > texture{ tx_xadrez } }

   object { box { <-0.5,-1,-0.3>,<2.5,2.5,0.0> }}

  #declare xi = 0;

  #macro quadro(k,xi,yi)
   union {
        #if( xi=0 | xi =4 )
        object { box { <k*xi,-0.15+k*yi,-0.15>,<k*xi+0.15,k*yi+0.15,0.6>   texture { tx_fosca } } }
        #end

        #if( xi=1 | xi =3 )
        object { cylinder { <k*xi,-0.15+k*yi,-0.15>,<k*xi+0.15,k*yi+0.15,0.6>,0.2   texture { tx_vidro }   } }
        #end

        #if( xi=2 & yi =2 )
        union{
        object { cylinder { <k*xi,-0.15+k*yi,-0.15>,<k*xi+0.15,k*yi+0.15,0.6>,0.2   texture { tx_plastico }   } }
        }
#else
#if( xi=2 | xi =2 )
        union{
        object { cylinder { <k*xi,-0.15+k*yi,-0.15>,<k*xi+0.15,k*yi+0.15,0.6>,0.2   texture { tx_plastico }   } }
        }
#end

        #end
   }
   #end

#declare i = 0;
#while( i < 5 )
#declare j = 0;
 #while( j < 5 )
  quadro(0.4,i,j)
  #declare j = j + 1;
 #end
#declare i = i + 1;
#end

}

#include "camlight.inc"
#declare centro_cena = < 0.00, 0.00, 1.00 >;
#declare raio_cena = 6.0;
#declare dir_camera = < 0, 0.10, 5.00 >;
#declare dist_camera = 16.0;
#declare intens_luz = 1.00;
camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)