// MC930 - Computacao Grafica // Setimo Exercicio de laboratorio - 16/11/2000 // Luis Arthur Micai Nunes RA: 971106 #include "textures.inc" background {color rgb <0.00, 0.00, 0.00> } light_source { < 70.00, 40.00, -50.00 > color rgb < 5.20, 5.20, 5.20 > } camera { location <50,40,-80> look_at<50,20, 4> } #declare chao = plane { y, 0 pigment {color rgb <.9,.9,.9> } } #declare estrutura = union { box { <0,0,0>, <12,16,8> texture { pigment { color rgb <0.0, 0.0, 1.0> } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1} } } box { <4,0,-0.01>, <8,4,0.01> texture { pigment { color rgb <0,0.7,0> } } } } #declare janela_lateral = box { <12.01, 1, 2 > <11.09, 3, 6 > texture { pigment { color rgb <0,0.7,0> } } } #declare janela_fachada = box { <1,1,-0.01>, <3,3,0.01> texture { pigment { color rgb <1,1,0> } } } #declare i = 0; // horizontal da fachada #declare k = 1; // vertical da lateral #declare predio = union { object {estrutura} #while (i < 3) #declare j = 1; // vertical da fachada #while (j < 4) object { janela_fachada translate } #declare j = j + 1; #end #declare j = 1; #declare i = i + 1; #end #while (k < 4) object {janela_lateral translate <0,k*4,0> } #declare k = k + 1 ; #end } #declare m = 0; union { object{chao} #while (m < 5) #declare n = 0; #while (n < 3) object {predio translate } #declare n = n + 1; #end #declare m = m + 1; #end }