// Last edited on 2004-01-22 21:49:20 by stolfi // ====================================================================== #declare ctr = < 0.0, 0.0, -1.0 >; #declare camDir = < 17.00, -7.00, 7.00 >; camera { location ctr + 1.00*camDir right -1.00*x up 0.75*y sky z look_at ctr } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.10, 0.10, 0.30 > } #include "colors.inc" // Cores... #declare tinta_Verm = texture { pigment { color rgb < 1.00, 0.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Azul = texture { pigment { color rgb < 0.30, 0.30, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Cinza = texture { pigment { color rgb < 0.30, 0.30, 0.30 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare pacote_forma_A = box { < -0.2, -0.2, -0.2 >, -1*< -0.2, -0.2, -0.2 > rotate 45*x rotate 45*y rotate 45*z } #declare pacote_A = light_source { <0, 0, 0> color rgb 0.5*<1, 1, 0> looks_like { pacote_forma_A } } #declare vertices = union { #declare k = -2; #while(k <= 2) #declare j = -2; #while (j <= 2) #declare i = -2; #while (i <= 2) sphere { <2*i, 2*j, 2*k> , 0.3 } #declare i = i + 1; #end #declare j = j + 1; #end #declare k = k + 1; #end texture { tinta_Azul } } #declare arestas = union { #declare fonte = seed(3489834); #declare k = -2; #while(k <= 2) #declare j = -2; #while (j <= 2) #declare i = -2; #while (i <= 2) #if (i < 2) #if (rand(fonte) < 0.1) #declare pac_loc = <2*(i+1), 2*j, 2*k>; difference { cylinder { <2*i, 2*j, 2*k> , <2*(i+1), 2*j, 2*k>, 0.1 } object { pacote_forma_A translate <(2*i)+1, 2*j, 2*k> } } #declare corR = rand(fonte); #declare corG = rand(fonte); #declare corB = rand(fonte); light_source { <(2*i)+1, 2*j, 2*k> color rgb 0.7* looks_like { pacote_forma_A texture { pigment {color rgb filter 0.7 } finish {ambient .8 diffuse .6 } } } } #else cylinder { <2*i, 2*j, 2*k> , <2*(i+1), 2*j, 2*k>, 0.1 } #end #end #if (j < 2) #if (rand(fonte) < 0.1) difference { cylinder { <2*i, 2*j, 2*k> , <2*i, 2*(j+1), 2*k>, 0.1 } object { pacote_forma_A translate <2*i, (2*j)+1, 2*k> } } #declare corR = rand(fonte); #declare corG = rand(fonte); #declare corB = rand(fonte); light_source { <2*i, (2*j)+1, 2*k> color rgb 0.7* looks_like { pacote_forma_A texture { pigment {color rgb filter 0.7 } finish {ambient .8 diffuse .6 } } } } #else cylinder { <2*i, 2*j, 2*k> , <2*i, 2*(j+1), 2*k>, 0.1 } #end #end #if (k < 2) #if (rand(fonte) < 0.1) difference { cylinder { <2*i, 2*j, 2*k> , <2*i, 2*j, 2*(k+1)>, 0.1 } object { pacote_forma_A translate <2*i, 2*j, (2*k)+1> } } #declare corR = rand(fonte); #declare corG = rand(fonte); #declare corB = rand(fonte); light_source { <2*i, 2*j, (2*k)+1> color rgb 0.7* looks_like { pacote_forma_A texture { pigment {color rgb filter 0.7 } finish {ambient .8 diffuse .6 } } } } #else cylinder { <2*i, 2*j, 2*k> , <2*i, 2*j, 2*(k+1)>, 0.1 } #end #end #declare i = i + 1; #end #declare j = j + 1; #end #declare k = k + 1; #end texture { tinta_Cinza } //no_shadow } object { vertices } object { arestas }