// Last edited on DATE TIME by USER
// Processed by remove-cam-lights

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

#declare tx_plastico =
  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_marrom_escuro =
  texture{
    pigment{ color rgb < 0.92, 0.64, 0.51 > }
    finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
  }

#declare tx_verde =
  texture{
    pigment{ color rgb < 0.47, 0.79, 0.47 > }
    finish{ diffuse 0.9 ambient 0.1 }
  }

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

#declare tx_outro_verde =
  texture{
    pigment{ color rgb < 0.14, 0.90, 0.35 > }
    finish{ diffuse 0.9 ambient 0.1 }
  }

#declare tx_teste =
  texture{
    pigment{ color rgb < 2.54, 2.54, 2.54 > }
    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.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > }
    finish{ diffuse 0.9 ambient 0.1 }
    scale 2.0
  }

#declare raio = 2.000;

#macro abaco() //0.0 inicio do passo e 1.0 fim do passo
union{

object { caixa scale <3,3,3>  texture{ tx_verde} }

}#end

#macro interpola (f0,v0,f1,v1,f)
union{

#local ss = (f-f0)/(f1-f0);
#local rr = (1-ss);

(rr*v0 + ss*v1)

}#end

#macro quadro_anterior(fase)
union{
#local i = 0;
#while (i<NQ)
        #if  ((tempo[i] <= fase) & (tempo[i+1] >= fase) & (i=NQ-1))
        #local resp = i;
        #end

#local i = i+1;
#end

(resp)
}#end

#declare bolinha =
  sphere{ < 0,0,0 >, 0.60 }

#declare caixa =
 box{ <0,0,0>, <1,1,1.4> texture{ tx_verde} }

#declare bolota =
  sphere{ < 0,0,0 >, 2.00 }

#declare biscoito =
  torus{ 0.6, 0.4}

#declare bola =
  sphere{
    < 0.00, 0.00, 0.00 >, raio
    texture{ tx_plastico }
  }

#declare pino =
  cylinder{
    < 0, 0,0 >,
    < 0, 0,2 >,
    0.75
    texture{ tx_fosca }
  }

#declare orelha =

 cone {
    <0, 0, 0>, 0.5    // Center and radius of one end
    <0, 0, 2>, 0.0    // Center and radius of other end
    texture { tx_fosca }
  }

#declare pinao =
  cylinder{
    < 0, 0,0 >,
    < 0, 0,4 >,
    1.5
    texture{ tx_fosca }
  }

#declare pino_deitado =
  cylinder{
    < 0, 0,0 >,
    < 0, 2,0 >,
    0.75
    texture{ tx_fosca }
  }

#declare furo =
  cylinder{
    < -1.00, -2.00, -2.00 >,
    < +1.00, +2.00, +1.00 >,
    0.75*raio
    texture{ tx_fosca }
  }

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

#include "eixos.inc"

union{
  object{ eixos(3.00) }

object{ abaco() }

}

#include "camlight.inc"
#declare centro_cena = < 2.00, 2.00, 3.00 >;
#declare raio_cena = 27.0;
#declare dir_camera = < 20, 9, 19.00 >;
#declare dist_camera = 16.0;
#declare intens_luz = 1.00;
camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)