// Last edited on 2003-04-12 08:45:55 by stolfi // Autor: Mário Riudoms Sangenis - RA: 992198 #include "colors.inc" #include "textures.inc" background{ LightSteelBlue } #declare ctr = < 175.00, -3.00, 350.00 >; #declare vis = < -38.00, 0.00, 61.00 >; #declare cam = vis + 4.5*y; camera { location ctr + 2*cam right -1.2*x up 0.4*y sky < 0.00, 1.00, 0.00 > look_at ctr } light_source { ctr + 10*(vrotate(vis, 20*y) + 30*y) color rgb 1.1*< 1.00, 0.90, 0.90 > } light_source { ctr + 10*(0.2*vrotate(vis, -90*y) + 60*y) color rgb < 1.00, 1.00, 1.00 > } light_source { ctr + 10*(0.2*vrotate(vis, 120*y) + 60*y) color rgb 1.2*< 1.00, 1.00, 1.00 > } #declare base_solida = union { object { cone{< 0.00, -4.00, 0.00 >, 3.0, < 0.00, 4.00, 0.00 >, 0.00 texture {Chrome_Metal}} } object { sphere{<0.00, 4.00, 0.00>, 0.5 texture{Gold_Metal}} } } #declare prateleira = difference { object { base_solida } object { box{<-1.50, -3.50, -1.50>, <1.50, -2.20, 3.00> pigment{White}} } object { box{<-1.00, -1.50, -1.00>, <1.00, -0.50, 2.50> pigment{White}} } object { box{<-0.60, 0.20, -0.60>, <0.60, 1.20, 2.00> pigment{White}} } } #declare caixas = union { #declare gerador = seed(74161); #declare k = 0; #while (k < 3) box{<-1.00, -3.50, -1.00>, <-0.50, -2.50, 2.50> pigment {color rgb } translate <0.8*k, 0, 0>} #declare k = k + 1; #end } #declare latas = union { #declare gerador = seed(1234); #declare l = 0; #while (l < 2) cylinder{<-0.40, -1.50, 0.90>, <-0.40, -0.80, 0.90>, 0.35 pigment{color rgb <1-rand(gerador), 1-rand(gerador), rand(gerador)>} translate <0.9*l, 0, 0>} #declare l = l + 1; #end } #declare caixa = #declare gerador = seed(2526); box{<-0.30, 0.2, -0.50>, <0.30, 0.80, 0.90> pigment{color rgb } } #declare prateleira_cheia = union { object { caixas } object { latas } object { caixa } object { prateleira } } #declare supermercado = union { #declare i = 1; #while (i < 50) #declare j = 1; #while (j < 50) #if (mod(j, 2) = 0) object { prateleira_cheia translate <14*div(j, 2)-7, 0, 14*i-7> } #else object { prateleira_cheia translate <14*div(j, 2), 0, 14*i-14> } #end #declare j = j + 1; #end #declare i = i + 1; #end } #declare plano = plane { y, -4.0 pigment {checker color Black, color White } } // Aqui está a cena, finalmente: union { object { plano } object { supermercado } }