// André Luiz Gomide Papa - ra002793 // TP03 - 05/10/2004 // ====================================================================== // CÂMERA camera { location < 30.00, 30.00, 4.00 > // Posição do observador. right -1.00*x // Largura RELATIVA da imagem. up 0.75*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 0.00, 0.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. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } #declare raio = 2.000; #declare tinta_A = texture { pigment { color rgb < 0.10, 0.80, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_B = texture { pigment { color rgb < 1.00, 0.80, 0.10 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_C = texture { pigment { color rgb < 0.2, 0.2, 0.1 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_D = texture { pigment { color rgb < 0.5, 0.5, 0.5 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare sala_e = box{ <0.00, 0.00, 0.00>, <2,2,2> } #declare sala_q1 = box{ <3, 0.50, 0.50>, <-1,1.50,1.50> } #declare sala_q2 = box{ <0.50, -1, 0.50>, <1.50, 3, 1.50> } #declare sala_c1 = cone{ <3,1,1>,0.75 <-1,1,1>,0.75 } #declare sala_c2 = cone{ <1,-1,1>,0.75 <1,3,1>,0.75 } #declare terreo = box{ <0,2,0>, <14,12,-2> texture{tinta_D} } #declare terreo2 = box{ <-1,6,-0.5>, <15,8,-2> texture{tinta_D} } #declare porta = box{ <13.5,6,-0.5>, <14,8,-2> texture{tinta_C} } #declare janela1 = box{ <-1,2.5,-0.5>, <15,5.5,-1.5> } #declare janela2 = box{ <-1,8.5,-0.5>, <15,11.5,-1.5> } #declare cor_cristal = <0.7 0.7 0.7>; #declare tx_cristal = texture{ finish{ ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment{color cor_cristal filter 1} } #declare vidro1 = box{ <13.5, 2.5, -0.5>, <14, 5.5, -1.5> texture{tx_cristal} interior{ior 1.5} } #declare vidro2 = box{ <13.5, 8.5, -0.5>, <14, 11.5, -1.5> texture{tx_cristal} interior{ior 1.5} } // Aqui está a cena, finalmente: #declare predio = #declare gerador = seed(12345); #declare eixo_x = 0; #while(eixo_x < 13) #declare eixo_z = 0; #while(eixo_z < 5) #declare i = 1; #while(i < 6) #declare sala = #if (rand(gerador) < 0.5) difference{ object {sala_e} object {sala_q1} object {sala_q2} } #else difference{ object {sala_e} object {sala_c1} object {sala_c2} } #end object {sala #if(rand(gerador)<0.5) texture{tinta_A} #else texture{tinta_B} #end translate } #declare i = i+1; #end #declare eixo_z = eixo_z+2; #end #declare eixo_x = eixo_x+2; #end union { object{predio} object{vidro1} object{vidro2} object{porta} difference{ object{terreo} object{terreo2} object{janela1} object{janela2} } } plane {z,0 texture{ pigment{checker <0.2,0.1,0.1>,<0.3,0.3,0.5>} finish{ambient 0.1 diffuse 0.9} scale 2 } translate <0,0,-2> }