// Exemplo de arquivo de descricao de cena para POV-ray
// Last edited on 2010-03-04 15:44:01 by stolfi

// ======================================================================
// CORES E TEXTURAS

background{ color rgb < 1, 1, 1 > }

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

#declare tx_green =
  texture{
    pigment{ color rgb < 0.00, 1.00, 0.00 > }
  }
// ======================================================================
// DESCRIÇÃO DA CENA 

#declare raio = 1.000;

// Partes da cena:
  
#declare container1 = 
  sphere{
    < 0, 0 , -1.5 >,
    1.5 *raio
    texture{ tx_fosca }
  }

#declare container2 = 
  cylinder{
    < 0, 0 , 0 >,
    < 0, 0, -3 >,
    0.7*raio
    texture{ tx_fosca }
  }

#declare container3 = 
  cylinder{
    < 0, 0 , -2.5 >,
    < 0, 0, -3 >,
    0.7*raio
    texture{ tx_fosca }
  }

#declare masher1 = 
  torus{
    0.8*raio,
    0.2*raio
    texture{ tx_fosca }
  }

#declare masher2 = 
  cylinder{
    < 0, -2 , 1 >,
    < 0, -4, 1 >,
    0.3*raio
    texture{ tx_fosca }
  }

#declare masher3 = 
  cone{
    < 0, -2 , 1 >, 0.3*raio,
    < 0, -1, 1 >, 0
    texture{ tx_fosca }
  }

#declare masher4 = 
  cylinder{
    < 0, -3 , 1 >,
    < 0, -2, 1.8 >,
    0.1*raio
    texture{ tx_fosca }
  }

#declare masher = 
  union{
    object{ masher1
	    translate <0, -2, 1> }
    object{ masher2 }
    object{ masher3 }
    object{ masher4 }
    object{ masher4
	    rotate <0,180,0>
	    translate <0, 0,2 >}
  }

#declare coconut = 
  sphere{
    < 0, 0 , 1 >,
    0.5 *raio
    texture{ tx_green }
  }

#include "eixos.inc"

// Aqui está a cena, finalmente:

  object{ eixos(3.00) }

  union{
    difference{
      object{ container1 }
      object{ container2 }
    }
    intersection{
      object{ container1 }
      object{ container3 }
    }
  }
  
  object { masher }

  object { masher rotate <0, 0, 180>}

  object { coconut }


#include "camlight.inc"
#declare centro_cena = < 0.00, 0.00, 0.00 >;
#declare raio_cena = 10.0;
#declare dir_camera = < 100.01, 00.01, 00.01 >;
#declare dist_camera = 30.0;
#declare intens_luz = 1.00;
camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)