// Vitor Sexto Bernardes - RA 010063 // Last edited on 2003-11-26 06:18:26 by stolfi // ====================================================================== // CÂMERA #declare ctr = < 0.00, 0.00, 0.00 >; #declare camdir = < 0, 10, 30 > ; camera { location ctr + 1.00*camdir right -1.00*x up 0.75*y sky y // Qual direção é "para cima"? look_at ctr } // ====================================================================== // FONTES DE LUZ light_source { 10 * < +40.0, +30.0, +20.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < -40.0, 30.0, +20.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } #declare cor_carro1 = texture { pigment { color rgb <0.3, 0.1, 0.8> } finish { diffuse 0.9 specular 0.5 roughness 0.005 ambient 0.1 } } #declare cor_carro2 = texture { pigment { color rgb <0.2, 0.9, 0.4> } finish { diffuse 0.9 specular 0.5 roughness 0.005 ambient 0.1 } } #declare cor_pneu = texture { pigment { color rgb <0, 0, 0> } finish { diffuse 0.9 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tx_prato = texture { pigment { color rgb <0.8, 0.8, 0.8> } finish { diffuse 0.9 specular 1.5 roughness 0.005 ambient 0.1 } } #declare chao = plane { <0, 1, 0>, 0 pigment { checker color rgb <0,0,0> color rgb <1,1,1> } } #declare pneu = cylinder { <0,0,0>, <0.5,0,0>, 1.1 texture { cor_pneu } } #declare carro = union { box { <2, 1.1, 10>, <-2, 3.5, 0> } object { pneu translate <2, 1.1, 1.7> } object { pneu translate <-2.5, 1.1, 1.7> } object { pneu translate <2, 1.1, 8.3> } object { pneu translate <-2.5, 1.1, 8.3> } } #declare carro1 = object { carro texture { cor_carro1 } translate <5, 0, -20> } #declare carro2 = object { carro texture { cor_carro2 } translate <-5, 0, -45> } #declare frase1 = text { ttf "arial.ttf" "ENTRE NESSA CORRIDA" 1, 0 pigment { color rgb <1, 0.4, 0.2> } translate <-6, 7, 0> } #declare frase2 = text { ttf "arial.ttf" "CONTRA A FOME" 1, 0 pigment { color rgb <1, 0.4, 0.2> } translate <-4, 5, 0> } #declare frase3 = union { text { ttf "arial.ttf" "FORMULA" 1, 0 pigment { color rgb <1, 0.1, 0.1> } translate <-2, 7, 18> } text { ttf "arial.ttf" "ZERO" 1, 0 pigment { color rgb <1, 0.1, 0.1> } translate <-1, 5, 18> } } #declare prato = difference { cylinder { <0, 0, 0>, <0, 1, 0>, 10 texture { tx_prato } } cylinder { <0, 0.5, 0>, <0, 2, 0>, 8 texture { tx_prato } } } #declare tempo_carro = (clock - 0.0)/(0.7 - 0.0); // vai de 0 a 1 enquanto clock vai até 0.7 #declare z_carro1 = 70*tempo_carro*tempo_carro; #declare z_carro2 = 80*tempo_carro*tempo_carro; //#if (clock < 0.6) #declare tempo_frase1e2 = (clock - 0.3)/(0.6 - 0.3); #declare x_frase1 = -40 + (40*tempo_frase1e2); #declare x_frase2 = 40 - (40*tempo_frase1e2); //#else // #if (clock < 0.8) // #declare x_frase1 = 0; // #declare x_frase2 = 0; // #end //#end //#declare z_frase1e2 = 40*tempo_frase1e2; #declare tempo_frase3 = (clock - 0.7)/(1 - 0.7); #declare y_frase3 = 10*tempo_frase3; #declare x_prato = 30*tempo_frase3; //CENA FINAL: object { chao } object { carro1 translate <0, 0, z_carro1> } object { carro2 translate <0, 0, z_carro2> } // #if (clock < 0.75) object { frase1 translate } object { frase2 translate } // #else // object { frase1 translate <0, 0, 40-tempo_frase1e2> } // object { frase2 translate <0, 0, 40-tempo_frase1e2> } // #end object { frase3 translate <0, 10-y_frase3, 0> } object { prato translate <30-x_prato, 0, 0> }