// Marco Antonio Leao RA:971203 // 7a Atividade de Laboratorio de MC930 background{ color rgb < 0.90, 0.90, 0.90 > } #include "colors.inc" camera { sky <0,0,1> location <-6.0,-8.0,10.0> look_at <10.0,10.0,4.0> } light_source { <-200, -200, 200> color White } plane { z, 500 texture { pigment { SkyBlue } finish { ambient 1 diffuse 0} } texture { pigment { bozo turbulence .5 color_map { [0 White] [1 White filter 1] } } finish { ambient 1 diffuse 0 } scale <1000, 250, 250> rotate <5, 45, 0> } } plane { z, 1.5 pigment { LightGrey } } #declare i = 1; #declare j = 1; #declare k = 1; #declare a = seed(2.84); #declare b = seed(4.5); #declare andares = int(rand(a)*20); #declare predio = box { < 2, 0, 1.5 > < 4, 1.5, 2.5+0.5*andares> pigment { Blue } } #declare porta = box { < 2.5, -0.1, 1.5 > <3.5, 0.1, 2 > pigment { Yellow } } #declare quadra = box { < -2, 5 ,1.3> < 8, -3, 1.55> pigment { Green } } union { object {predio} object {porta} object {quadra} #while (i < andares) #while (j < 5) #if (rand(b) < 0.75) box { <1.6+0.5*j, -0.1, 2.1+0.5*i> <1.9+0.5*j, 0.1, 2.4+0.5*i> pigment {Yellow}} #end #declare j = j + 1; #end #while (k < 4) #if (rand(b) < 0.75) box { <1.9, -0.4+0.5*k, 2.1+0.5*i> <2.1, -0.1+0.5*k, 2.4+0.5*i> pigment {Yellow}} #end #declare k = k + 1; #end #declare j = 1; #declare k = 1; #declare i = i + 1; #end }