// LAB 06 - O Braço da Lei // ====================================================================== // CÂMERA // ====================================================================== // CÂMERA camera { location < 20.00, -60.00, 10.00 > // Posição do observador. right -1.00*x // Largura RELATIVA da imagem. up 0.50*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 20.00, 5.00, 5.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 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < -50.0, 0.0, 0.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.8, 0.85, 0.9 > } #include "colors.inc" #declare eixos = union { cylinder { <-100,0,0>, <100,0,0>, 0.3 pigment {Blue} } cylinder { <0,-100,0>, <0,100,0>, 0.3 pigment {Red} } cylinder { <0,0,-100>, <0,0,100>, 0.3 pigment {Green} } } //object { eixos } #declare aco = texture { pigment { Gray } finish { ambient 0.05 diffuse 0.25 reflection Gray specular 0.2 roughness 0.05 } } #declare ouro = texture { pigment { Yellow } finish { ambient 0.05 diffuse 0.3 reflection Gold specular 0.2 roughness 0.05 } } #declare cristal = texture{ finish{ ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment {color Blue filter 1} } #declare tempo = clock; #if (tempo > 0.5) #declare tempo = 1-tempo; #end #declare tempo = 2*tempo; #declare alfa = -90*tempo; #declare beta = 50*tempo; #declare gama = 90*tempo; #declare theta = 80*tempo; #declare articulacao = sphere{ <0,0,0>,2 texture { cristal } } #declare mao = union{ cone{ <0,0,0>,3 <5,0,0>,0 pigment { Yellow } } object { articulacao } } #declare meio1 = union { cylinder{ <0,0,0>, <6,0,0> 1.5 texture { aco } } object { mao rotate <0,theta,0> translate <7,0,0> } } #declare meio2 = union { object { meio1 translate <1,0,0> } object { articulacao } } #declare meio3 = union { cylinder{ <0,0,0>, <8,0,0> 1.5 texture { aco } } object { meio2 rotate <0,gama,0> translate <9,0,0> } } #declare meio4 = union { object { meio3 translate <1,0,0> } object { articulacao } } #declare meio5 = union { cylinder{ <0,0,0>, <10,0,0> 1.5 texture { aco } } object { meio4 rotate <0,beta,0> translate <11,0,0> } } #declare meio6 = union { object { meio5 translate <1,0,0> } object { articulacao } } #declare meio7 = union { cylinder{ <0,0,0>, <12,0,0> 1.5 texture { aco } } object { meio6 rotate <0,alfa,0> translate <13,0,0> } } #declare meio8 = union { object { meio7 translate <1,0,0> } object { articulacao } } object { meio8 } plane { z, -5 texture { pigment { granite } finish { ambient 0.1 diffuse 0.9 } scale 3.0 } }