// Last edited on 2003-04-12 10:13:08 by stolfi // Ivan Francisco Coutinho Costa // RA 001833 // MC930 - TP 5 - Supermercado // Data 01/04/2003 #include "colors.inc" #include "textures.inc" #include "woods.inc" background { color 0.5*HuntersGreen + 0.5*White } camera { location 1.2*<-4, 8, -40> right <1.2, 0,0> up <0,0.4, 0> look_at <0,4,0> } light_source { 10*<10, 10, -40> color 1.4*White } light_source { 10*<-10, 10, -40> color 1.4*White } light_source { 10*<0, 10, -40> color 1.0*White } plane { y, 0 pigment { color Grey } } #declare cor_cristal= White; #declare tx_cristal= texture { finish { ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment { color cor_cristal filter 1 } } #declare gerador=seed (123456); #declare suporte = box { <0.1,0,0>, <-0.4, 10, 2> texture { T_Wood2 } } #declare estante= #declare distlatas = 2; #declare distprateleiras = 2; #declare alturalata = 0.8; #declare raiolata = 0.2; union { #declare i=0; #while (i<5) // prateleiras #declare j=0; #while (j<20) // latas // prateleiras #declare a=distprateleiras*i; box { <-10, a, 1>, <10, a+0.1, -1> texture { tx_cristal } interior{ ior 2.0} } // latas #declare b=(distlatas/2)*j; cylinder {<-10+b,a,0>, <-10+b,a+alturalata,0> raiolata pigment {color rgb }} #declare j=j+1; #end #declare i=i+1; #end object { suporte translate <-10,0,0> translate <0,0,-1>} object { suporte translate <10,0,0> translate <0,0,-1>} } #declare varias_estantes= #declare k=-10; #while (k<10) object { estante rotate <0,90,0> translate } #declare k=k+1; #end // a cena object { varias_estantes }