// Last edited on 2003-10-23 01:07:52 by stolfi // Palácio de Cristal - por Gilberto Sgarbi Filho - RA 001754 // ====================================================================== // CÂMERA #declare ctr = <0, 0, 0>; #declare camdir = < 40, 20, 15 >; camera { location ctr + 0.70*camdir right -1.00*x up 0.75*y sky y // Qual direção é "para cima"? look_at ctr } // 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, +70.0, +50.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e cor da luz. } light_source { 10 * < +50.0, +60.0, +10.0 > // Posição da lâmpada. color rgb 0.5 * < 1.00, 1.00, 1.00 > // Intensidade e cor da luz. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } #declare raio = 0.5; #declare preto = texture { pigment { color rgb < 0.00, 0.00, 0.00 > } } #declare verde = texture { pigment { color rgb < 0.00, 1.00, 0.00 > } } #declare amarelo = texture { pigment { color rgb < 1.00, 1.00, 0.00 > } } #declare vermelho = texture { pigment { color rgb < 1.00, 0.10, 0.10 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare azul = texture { pigment { color rgb < 0.50, 0.00, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare predio = cone { <0, 6, -4>, 2, <0, 2, -4>, 3 texture { azul } } #declare carro = box { < 0, 0, 6 >, < 4, 1.5, 2 > texture { vermelho } } #declare pneu = cylinder { < 0.5, 0.5, 5>, < 4.5, 0.5, 5 >, raio texture { preto } } #declare comida = box { < 0.5, 0, 3 >, < 3.5, 4, 6 > texture { verde } } #declare chao = box { <-4, -3, -12>, <4, -3, 12> texture { checker texture {preto}, texture {vermelho} } } // Aqui está a cena, finalmente: #declare pA = <0,0,0>; #declare pB = <-5,0,-3>; #declare pC = <0,0,-6>; #declare pD = <0,0,-10>; union { #declare tempo = (clock - 0.5) / (0.5 - 1.0); object { chao } #if (clock < 0.4) // Vai em direção ao armazém... #declare pos = (1-tempo)*pB + tempo*pA; #end #if (clock <0.75) // Continua o caminho, já com a comida... #declare pos = (1-tempo)*pC + tempo*pB; #else #declare pos = (1-tempo)*pD + tempo*pC; #end object {pneu translate pos } object {pneu rotate 180*y translate <5,0,8> translate pos } object {carro translate pos} #if (clock >= 0.2) object {predio} #end #if (clock >= 0.5) object {comida translate pos} #end #if (clock >=0.75) object {predio texture {amarelo} translate <0,0,-8>} #end }