#include "textures.inc" background { color rgb < 0.9, 0.9, 1 > } light_source { < 15, 15, 30 > color rgb < 1, 1, 1 > } camera { location < 50, 50, 40 > sky < 0, 0, 1 > look_at < 0, 0, 0 > } #declare tinta_x = texture { pigment { color rgb < 0.6, 0.94, 0.88 > } finish { diffuse 1 specular 0.7 roughness 0.007 ambient 0.2 } } #declare madeira = texture { pigment { wood } } #declare vidro = texture { pigment { color rgb < 0.97, 0.97, 1 > } } #declare i = 1; #declare h = seed(pi); #declare g = rand(h); #declare n_and = 10*g //#declare n_janf = 4 //#declare n_janl = 1 //#declare n_ruans = //#declare n_rualo = #declare porta = box { < 3.9, 1, 0 > < 3.7, -1, 3 > texture { madeira } } #declare janelas = union { union { difference { box { < 4.2, 1, 0 > < 3, 3, 2 > texture { tinta_x } } box { < 6, 1, 0 > < 2, 3, 2 > texture { tinta_x } } } box { < 3.9, 1, 0 > < 3.7, 3, 2 > texture { vidro } } } union { difference { box { < 4.2, -1, 0 > < 3, -3, 2 > texture { tinta_x } } box { < 6, -1, 0 > < 2, -3, 2 > texture { tinta_x } } } box { < 3.9, -1, 0 > < 3.7, -3, 2 > texture { vidro } } } } #declare predio = union { box { < 4, 5, 0 > <-4, -5, 4 > texture { tinta_x } } box { < 2, 2, 4 + 4*n_and > <-2, -2, 8 + 4*n_and > texture { tinta_x } translate < 2, 2, 0 > } cone { < 0, 0, 7 + 4*n_and > 0.3 < 0, 0, 13 + 4*n_and > 0.003 texture { tinta_x } translate < 2, 2, 0 > } } #declare prediozao = union { difference { object { predio } box { < 9, 1, 0 > < 3, -1, 3 > texture { tinta_x } } } object { porta } union { #while ( i < n_and ) union { box { < 4, 5, 4 + ( i-1 )*4 > < -4, -5, 8 + ( i-1 )*4 > texture { tinta_x } } object { janelas translate < 0, 0, 4*i > } } #declare i = i + 1; #end } } #declare j = 1; #declare k = seed (2.8); union { #while ( j < 3 ) object { prediozao translate < 12*j + 3, 12*j, 0 > } #declare j = j + 1; #end }