// 7o. Exercicio de MC930 // Fabio Rogerio Candido - RA 962319 // Last Edit 16/11/2000 background{ color rgb < 1,1,1 > } light_source { < -20.00, -35.00, 10.00 > color rgb < 1.0, 1.0, 1.0 > } camera { location < -20.00, -20.00, 0.00 > right < -1.20, 0.00, 0.00 > up < 0.00, 0.00, 0.90 > sky < 0.00, 0.00, 1.00 > look_at < 0.00, 0.00, 0.00 > } #declare sei_la = texture { pigment { color rgb < 0.8, 0.8, 0.8 > } finish { diffuse 0.5 specular 0.5 roughness 0.070 ambient 0.1 } } #declare marrom = texture { pigment { color rgb < 0.30, 0.00, 0.50 > } finish { diffuse 0.5 specular 0.5 roughness 0.050 ambient 0.1 } } #declare preto = texture { pigment { color rgb < 0.00, 0.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.050 ambient 0.1 } } #declare branco = texture { pigment { color rgb < 1.00, 1.00, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.050 ambient 0.1 } } #declare predio = box { <-7.0, 5.0, -5.0>, < 7.0, -5.0, 9.0> texture { marrom } } #declare porta = box { <-1.5, -5.0, -5.0>, < 1.5, -5.5, -2.0> texture { sei_la } } #declare janela = box { <2.3, -5.0, -1.0>, <5.5, -5.5, 0.0> texture { branco } } #declare janela_lateral = box { <-7.0, -2.3, -1.0>, <-7.5, -4.8, 0.0> texture { branco } } #declare andar = 0; #declare ultimo_andar = 7; #declare front_jan_max = 3; #declare janela_lateral_max = 2; // Building... difference { object { predio} object { porta } #declare andar = 0; #while (andar < ultimo_andar) #declare front_jan = 0; #while (front_jan < front_jan_max) object { janela translate <-4.4 * front_jan, 0, 3 * andar> } #declare front_jan = front_jan +1; #end #declare janela_lateralX = 0; #while (janela_lateralX < janela_lateral_max) object { janela_lateral translate <0, 4.1* janela_lateralX, 3 * andar> } #declare janela_lateralX = janela_lateralX +1; #end #declare andar = andar + 1; #end }