// Exemplo de arquivo de descricao de cena para POV-ray
// Last edited on 2023-09-13 14:37:11 by stolfilocal

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

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

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

#declare tx_dourado  = 
  texture{
    pigment{ color rgb < 0.82, 0.83, 0.4 > }
    finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
  }

// ======================================================================
// DESCRICAO DA CENA 

#declare raio = 1.000;

// Partes da cena:

#declare perna1 = 
  cylinder{
    < +0.00, +0.00, -1.00 >,
    < +0.00, +0.00, +19.00 >,
    raio
    texture{ tx_plastico }
  }

#declare perna2 = 
  cylinder{
    < +0.00, +10.00, -1.00 >,
    < +0.00, +10.00, +6.00 >,
    raio
    texture{ tx_plastico }
  }

#declare perna3 = 
  cylinder{
    < +10.00, +0.00, -1.00 >,
    < +10.00, +0.00, +19.00 >,
    raio
    texture{ tx_plastico }
  }

#declare perna4 = 
  cylinder{
    < +10.00, +10.00, -1.00 >,
    < +10.00, +10.00, +6.00 >,
    raio
    texture{ tx_plastico }
  }

#declare pininho = 
  cone{
    < +0.00, +0.00, +19.00 >,
    raio
    < +0.00, +0.00, +21.00 >,
    0
    texture{ tx_dourado }
  }

#declare assento = 
  box{ 
    < -0.70, -0.70, +4.50 >,
    < +10.70, +10.70, +6.00 >
  }

#declare enconsto = 
  box{ 
    < -0.70, -0.75, +18.00 >,
    < +10.70, +0.75, +19.00 >
  }

#declare enconsto_maior = 
  box{ 
    < -0.70, -0.75, +10.00 >,
    < +10.70, +0.75, +13.00 >
  }

#declare bolinha = 
  sphere{ < 5,0,17.0 >, 1 }

#include "eixos.inc"

// Aqui este a cena, finalmente:

union{
  union{
    object{ perna1 }
    object{ perna2 }
    object{ perna3 }
    object{ perna4 }
    object{ assento translate < 0,0,0 > texture{ tx_plastico } }
  }
  object{ pininho }
  object{ pininho translate < 10,0,0 > }
  object{ enconsto translate < 0,0,0 > texture{ tx_plastico } }
  object{ enconsto translate < 0,0,-3 > texture{ tx_plastico } }
  object{ bolinha translate < 2,0,0 > texture{ tx_dourado } }
  object{ bolinha translate < -2,0,0 > texture{ tx_dourado } }

  difference{
    object{ enconsto_maior translate < 0,0,0 > texture{ tx_dourado } }
    union{
      object{ bolinha translate < 2,0,-5.5 > texture{ tx_dourado } }
      object{ bolinha translate < -2,0,-5.5 > texture{ tx_dourado } }
    }
  }
} 

#include "camlight.inc"
#declare centro_cena = < 2.00, 3.00, 8.00 >;
#declare raio_cena = 20.0;
#declare dir_camera = < 1.00, 2.00, 1.00 >;
#declare dist_camera = 5*raio_cena;
#declare intens_luz = 1.20;
camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)