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

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

#declare tx_tronco =
  texture{
    pigment{ color rgb < 0.65, 0.16, 0.16 > }
    finish{ diffuse 0.9 ambient 0.1 }
  }

#declare tx_chao =
  texture{
    pigment{ color rgb < 0.15, 0.16, 0.16 > }
    finish{ diffuse 0.9 ambient 0.1 }
  }

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

#declare tx_vermelha =
  texture{
    pigment{ color rgb < 0.89, 0.15, 0.13 > }
    finish{ diffuse 0.9 ambient 0.8 }
  }

#declare tx_xadrez =
  texture{
    pigment{ checker color rgb < 0, 0, 0 >, color rgb < 1, 1, 1 >}
    finish{ diffuse 0.9 ambient 0.1 }
    scale 2.0
  }

#include "eixos.inc"

#macro logotipo(texto, fase)
        #local n = strlen(texto);
        #local etapa = int(fase*n);
        #local frac = fase*n - etapa;
        #local i = 1;
        union {
                #while (i <= n)
                        #local letra = substr(texto, i, 1);
                        #local oy = rand(SEED) * 15 + -7;
                        #local oz = rand(SEED) * 15 + -7;

                        #local posini = <0, oy, oz>;
                        #local posfin = <0, i, 0>;
                        object { letra_chegando(letra, posini, posfin, fase) }
                        #local i = i + 1;
                #end
        }
#end

#macro letra_chegando(letra, posi, posf, fase)
        #local trans = fase * posf + (1 - fase) * posi;
        union {
                text {
                        ttf "arial.ttf" letra 0.6, 0
                        rotate <90, 0, 90>
                        translate(trans)
                }
        }
#end

#declare texto = "Guaycuru";

#declare SEED = seed(4815162342);

union{

        object {
                logotipo(texto, clock)
                texture { tx_tronco }
        }
}

#include "camlight.inc"
#declare centro_cena = < 0.00, 5.00, 0.00 >;
#declare raio_cena = 8.0;
#declare dir_camera = < 50.00, 5.00, 0.00 >;
#declare dist_camera = 8.0;
#declare intens_luz = 1.00;
camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)