// Last edited on DATE TIME by stolfi // ====================================================================== #declare ctr = < 20.00, 15.00, 0.00 >; #declare camDir = (< 20.00, 15.00, 80.00 >) - (< 20.00, 15.00, 0.00 >); camera { location ctr + 1.00*camDir right -1.00*x up 0.75*y sky y look_at ctr } // ====================================================================== // FONTES DE LUZ light_source { 10 * < +15.0, +60.0, +100.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA #declare semente=seed(2345234523); background{ color rgb < 0.25, 0.20, 0.25 > } #declare cinza = texture { pigment { color rgb < 0.75, 0.75, 0.75 > } finish { diffuse 0.5 specular 0.5 roughness 0.03 ambient 0.5 } } #declare azul = texture { pigment { color rgb < 0.00, 0.00, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.03 ambient 0.5 } } #declare verde = texture { pigment { color rgb < 0.00, 1.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.03 ambient 0.5 } } #declare vermelho = texture { pigment { color rgb < 1.00, 0.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.03 ambient 0.5 } } #declare nodo = sphere { <0, 0, 0> 2 texture { vermelho } } #declare enlaceX = cylinder { <0, 0, 0> <10, 0, 0> 0.2 texture { cinza } } #declare enlaceY = cylinder { <0, 0, 0> <0, 10, 0> 0.2 texture { cinza } } #declare pacote1 = cylinder { <4, 0, 0> <6, 0, 0> 1 } #declare pacote2 = box { <0, 0, 0> <2, 2, 2> translate <4, -1, 0> } #declare Count1=0; #while (Count1 <3) #declare Count2=0; #while (Count2 < 5) object { nodo translate <10*Count2,10*Count1,0> } object { enlaceY translate <10*Count2,10*Count1,0> } #if (Count2 > 0) object { enlaceX translate <10*(Count2-1),10*Count1,0> } #end #declare Count2=Count2+1; #end #declare Count1=Count1+1; #end #declare Count2=0; #while (Count2 < 5) object { nodo translate <10*Count2,10*Count1,0> } #if (Count2 > 0) object { enlaceX translate <10*(Count2-1),10*Count1,0> } #end #declare Count2=Count2+1; #end #declare var3 = 4*rand(semente); #if (var3 <= 1) object { pacote1 texture {verde} } #end #if (var3>1) #if (var3 <= 2) object { pacote1 texture {azul} } #end #end #if (var3>2) #if (var3 <= 3) object { pacote2 texture {verde} } #end #end #if (var3>3) object { pacote2 texture {azul} } #end