#include "colors.inc" background{ color rgb < 0.00, 0.03, 0.15 > } plane { <0, 1, 0>, 0 pigment { color White } } camera { location < -10.00, 10.00, 10.00 > right < 2.40, 0.00, 0.00 > up < 0.00, 0.00, 1.80 > sky < 0.00, 1.00, 0.00 > look_at < 5.00, 5.00, 0.00 > } light_source { < 0, 23, -10> color White } light_source { < 0, 10, 10> color White } #declare porta= union { box { <-1.0, 0.0, 4.9> < 1.0, 2.5, 5.1> pigment { Yellow } } cylinder { < 0.8, 1.25, 5.1 > < 0.8, 1.25, 5.2 > 0.1 pigment { White }} } #declare k = 1; #while (k <= 10) #declare n = k; // n andares #declare r = k; // r janelas object { union { box { <-(1 + r + (r -1)/2), 0, -5> < 1 + r + (r -1)/2, 3 + 3*n, 5> pigment { Red }} object { porta } #declare j = 1; #while (j <= n) #declare i = 0; #while (i < r) box { <-(r + (r-1)/2) + 3*i, 3*j + 1.3, -5.1> <-(r + (r-1)/2) + 3*i+2, 3*j + 2.0, +5.1> pigment { Green } } #declare i = i + 1; #end #declare j = j + 1; #end } #if ( k > 1) translate < k*k*10, 0, -k*k*10 > #end } #declare k = k + 1; #end