// Last edited on 2004-03-13 17:26:36 by stolfi
#include "colors.inc"
#include "stones.inc" 
#include "golds.inc"
#include "textures.inc"
#include "skies.inc"

#declare ctr = <0,2,0>;
#declare camDir = <11,10,-25>;

camera {
  location   ctr + 1.00*camDir
  right      1.00*x
  up         0.75*y
  sky        y
  look_at    ctr
}

light_source { 
  1* < 10.0, 30.0, 15.0 >               // Posição da lâmpada.
  color rgb 2.0 * < 1.00, 1.00, 1.00 >   // Intensidade e corda luz.
  /*photons{  
     refraction on
     reflection on
     }*/
}

#if (clock<0.3)
#declare temp = clock/0.3;
#declare trans = 12*temp;
#declare rot=0;
#declare batx=0;
#declare batz=0;
#declare baty=0;
#if ((temp=1))
#declare multi=10;
#else
#declare multi=0;
#end
#else
#declare temp = (clock-0.3)/(1.0-0.30);
#declare rot=83*temp;
#declare trans=15;
#declare batx=-3;
#declare batz=2*temp;
#declare baty=4*clock;
#if ((temp>0)&(temp<0.2))
#declare multi=10;
#else
#declare multi=0;
#end
#end


 
light_source { 
  1* < 0.0, 6.0, 0.0 >               // Posição da lâmpada.
  color rgb multi * < 1.00, 1.00, 1.00 >   // Intensidade e corda luz.
  }


#declare cor_espelho= color rgb <0.5,0.5,0.5>;  
#declare espelho= 
texture{ 
pigment {rgb cor_espelho}
finish{
ambient 0.05 diffuse 0.05
reflection cor_espelho
specular 0.50 roughness 0.001 
}
} 
#declare tinta_D = 
  texture {
    pigment { color rgb < 1.0, 1.0, 1.00 >} finish {ambient 0.7}
   
  }
  
  
#declare cor_metal_fosco= color rgb <0.3,0.3,0.3>;  
#declare metal_fosco= 
texture{
pigment {rgb cor_metal_fosco}
finish{
ambient 0.001 diffuse 0.5
reflection cor_metal_fosco
specular 0.050 roughness 0.1 
}
}


#declare cor_metal= color rgb <0.6,0.2,0.2>;  
#declare metal= 
texture{
pigment {rgb cor_metal}
finish{
ambient 0.05 diffuse 0.05
reflection cor_metal
specular 0.50 roughness 0.001 
}
}    
  
#declare carro=
 box{
  <-3,0,-2>,
  <3,2,2>
  texture{metal} interior{ior 1.1} 

 }
 
#declare carro1=
object{carro
translate<15,0,0>
}

#declare carro2=
object{carro
translate<-15,0,0>
}


#declare carromov1=
object {carro1
translate<-1*trans,0,0>
rotate<0,0,rot>
translate<-1*batx,baty,-1*batz>
}

#declare carromov2=
object {carro2
translate<trans,0,0>
rotate<0,0,-rot>
translate<batx,baty,batz>
}

#declare logotipo1 =
text{
ttf "arial.ttf"
"Formula Zero," 
0.15,0
texture{tinta_D}
translate<5,11,-20*clock>
}
#declare logotipo2 =
text{
ttf "arial.ttf"
"aqui quem morre..." 
0.15,0
texture{tinta_D}
scale<0.75,0.75>
translate<5,10,-20*clock>

}
#declare logotipo3 =
text{
ttf "arial.ttf"
"eh a fome" 
0.15,0
texture{tinta_D}
scale<0.75,0.75>
translate<6,9,-20*clock>

}


#declare coluna_sup=
lathe{
linear_spline  
9,
<0,0>,<1,0>,<1,5>,<2,5.5>,<2,6>,<1,6.5>,<1,11>,<2,11>,<2,12>  

texture{metal_fosco}
translate<0,1.8,0>
}

#declare coluna_inf=
prism{
conic_sweep
linear_spline
0.5,  
1,
7,
<3,5>, <-3,5>, <-5,0>, <-3,-5>, <3, -5>, <5,0>, <3,5>
rotate 180*x
scale<0.5,4,0.5>
translate<0,4,0>
texture{metal_fosco}  
}   

#declare coluna=
union{
object{coluna_inf}
object{coluna_sup}
}

#declare coluna1=
object{coluna
translate<0,0,-8.5>
}
#declare coluna2=
object{coluna
translate<0,0,8.5>
}
#declare pista=
box{
<-40,0,6.2>,
<40,0.2,-6.2>
texture{T_Stone1}
}

sky_sphere{S_Cloud5/*pigment{ color rgb <0.75,0.76,0.82>}*/}
plane{y,0
  texture{//T_Stone1
    pigment{ /*color rgb<0,1,0>*/checker color White, color Black scale 2 rotate y*30
    }
  } 
}

object{carromov1}
object{carromov2}
object{logotipo1}
object{logotipo2}
object{logotipo3}
object{coluna1}
object{coluna2}
object{pista}