// TP04 - MC930 // Tabata Reis - RA 003384 #include "colors.inc" #include "golds.inc" #include "textures.inc" #include "skies.inc" //---------------------------------------------- // Parâmetros da Animação #if (clock < 0.75) #declare tp = (clock-0.0)/(0.75-0.0); #declare pos_carro = (1-tp)*8 + tp*(-3); #declare pos_letreiro = (1-tp)*(-32) + tp*(-7.5); #declare pos_formula = 50; #declare pos_torus = 50; #declare raio_torus = 0.5; #else #declare tp = (clock-0.75)/(1.0-0.75); #declare pos_carro = -3; #declare pos_letreiro = 50; #declare pos_formula = -8; #declare pos_torus = 4; #declare raio_torus = (1-tp)*(0.01) + tp*(0.35); #end //background{ color rgb < 0.75, 0.80, 0.85 > } // ====================================================================== // CÂMERA camera { location < 8.00, 1.00, 20.00 > // Posição do observador. right -1.0*x // Largura RELATIVA da imagem. up 0.75*y // Altura RELATIVA da imagem. sky y // Qual direção é "para cima"? look_at < 0.00, 5.00, 0.00 > // Para onde a câmera está apontando. } // Nota: os parâmetros "right" e "up" devem ter a mesma proporção // que os parâmetros ${WIDTH} e ${HEIGHT} no Makefile. // ====================================================================== // FONTES DE LUZ light_source { 10 * < +50.0, +30.0, +50.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } sky_sphere {S_Cloud3} plane {y,-0.7 color pigment { White } } //---------------------------------------------- // Cores e Texturas #declare dourado = texture { T_Gold_4A } #declare vermelho = texture { pigment { Red } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare preto = texture { pigment { Black } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } //---------------------------------------------- // Objetos #declare pneu = torus { 0.5,0.2 texture { preto } } #declare corpo = difference{ cone { < 0.00 ,0.00 ,0.00 >, 0.0 < 5.00, 0.00, 0.00 >, 1.5 } box { < 0.00, 0.00, -1.70 > < 5.20, -1.70, 1.70 > } texture { vermelho } } #declare carro = union { object { corpo } object { pneu rotate -90*x translate<4.0,0,1.3> } object { pneu rotate -90*x translate<4.0,0,-1.3> } object { pneu rotate -90*x translate<2.0,0,0.8> } object { pneu rotate -90*x translate<2.0,0,-0.8> } rotate 50*y } #declare zero = torus { 1.0, raio_torus texture { dourado } rotate -90*x rotate 30*y } #declare letreiro_p1 = text { ttf "alger.ttf" "Formula Zero" 0.2, 0 texture { dourado } rotate 30*y scale <2.5,2.5,2.5> } #declare letreiro_p2 = text { ttf "alger.ttf" "Formula" 0.2, 0 texture { dourado } rotate 30*y scale <2,2,2> } //---------------------------------------------- // Cena object { carro translate } object { letreiro_p1 translate } object { letreiro_p2 translate } object { zero translate }