#include "colors.inc" #include "sunpos.inc" #include "woods.inc" // T_Wood1 - T_Wood35 #include "metals.inc" #include "skies.inc" #include "glass.inc" #include "rand.inc" #declare fonte=seed(314159); global_settings { assumed_gamma 1.3 max_trace_level 5 } sky_sphere { S_Cloud1 } /* light_source { 0 color rgb 2 area_light <4, 0, 0> <0, 0, 4> 4, 4 adaptive 0 jitter translate <-100, 1000, -100> }*/ light_source { 0 color rgb 2 // translate <0, 400, 3000> translate <-10, 100, -10> } #declare finish_metal = finish { ambient .1 diffuse .1 specular 1 roughness .001 metallic reflection { .3 metallic } } #declare prata = material { texture { pigment { Silver } finish { finish_metal } } } #declare preto_metal = material { texture { pigment { Black } finish { finish_metal } } } #declare azul_metal = material { texture { pigment { Blue } finish { finish_metal } } } #declare vermelho_metal = material { texture { pigment { Red } finish { finish_metal } } } #declare amarelo_metal = material { texture { pigment { Yellow } finish { finish_metal } } } #declare marrom_metal = material { texture { pigment { Brown } finish { finish_metal } } } #declare vidro1 = material { texture { pigment {rgbt 1} finish { ambient 0.0 diffuse 0.05 specular 0.6 roughness 0.005 reflection { 0.1, 1 fresnel on } conserve_energy } } interior { ior 1.5 fade_power 1001 fade_distance 0.9 fade_color 0.9 } } #declare void = material { texture { pigment { rgbt 0 } finish { ambient .1 diffuse .1 specular 1 roughness .001 metallic reflection { .9 metallic } } } } #declare vidro2 = material { texture { pigment { rgb <0.2, 0.2, 0.9>} finish { ambient 0.0 diffuse 0.05 specular 0.6 roughness 0.005 reflection { 0.1, 1.0 fresnel on } conserve_energy } } interior { ior 1.5 fade_power 1001 fade_distance 0.9 fade_color <0.5,0.5,0.9> } } #declare metalDT = material { texture { pigment { color DarkTurquoise } finish { diffuse 0.3 ambient 0.0 specular 0.6 reflection { 0.8 metallic } conserve_energy } } } #declare metalNMB = material { texture { pigment { color NewMidnightBlue } finish { diffuse 0.3 ambient 0.0 specular 0.6 reflection { 0.8 metallic } conserve_energy } } } #declare metalDSG = material { texture { pigment { color DarkSlateGrey } finish { diffuse 0.3 ambient 0.0 specular 0.6 reflection { 0.8 metallic } conserve_energy } } } #declare vidroDSB = material { texture { pigment {rgbt 1} finish { ambient 0.0 diffuse 0.05 specular 0.6 roughness 0.005 reflection { 0.1, 1.0 fresnel on } conserve_energy } } interior { ior 1.5 fade_power 1001 fade_distance 0.9 fade_color Col_Sapphire_01 } } #declare ouro = material { texture { pigment { BrightGold } finish { ambient .1 diffuse .1 specular 1 roughness .001 metallic reflection { .9 metallic } } } } #declare vidroDSG = material { texture { pigment {rgbt 1} finish { ambient 0.0 diffuse 0.05 specular 0.6 roughness 0.005 reflection { 0.1, 1.0 fresnel on } conserve_energy } } interior { ior 1.5 fade_power 1001 fade_distance 0.9 fade_color DarkSlateGrey } } plane { y, 0 texture { T_Wood1 } } #declare conector = cylinder { <-5, 0.5, 0>, <5, 0.5, 0>, 0.2 material { vidroDSG } } #declare pacote_torus = torus { 0.2, 0.05 material { amarelo_metal } finish { ambient 0.9 } rotate <90, 90, 0> scale 1/2 translate <0, 0.5, 0> // já na altura certa } #declare pacote_caixa = box { <-0.2, 0, -0.2>, <0.2, 0.4, 0.2> material { vermelho_metal } finish { ambient 0.9 } scale 1/2 translate <0, 0.4, 0> // já na altura certa } #declare pacote_esfera = sphere { <0, 0, 0>, 0.2 material { azul_metal } finish { ambient 0.9 } scale 1/2 translate <0, 0.5, 0> } #declare foto = box { <0, 0, 0>, <1280, 960, 0.0001> pigment { image_map { png "leo.png" } scale <1280, 960, 0> } scale 1/1000 finish { ambient 1 } } #declare xx = 0; #declare limite = 3; #while (xx < limite) #declare zz = 0; #while (zz < limite) union { //desenha o cpu text { ttf "arial.ttf" "LeO iNSiDE" 0.5, 0 translate <-3, 2, -3.5> material { ouro } scale 0.5 } box { //base do cpu <-2, 0, -2>, <2, 1, 2> #declare qual = 3*rand(fonte); #if (qual < 3 & qual >= 2) material { metalDSG } #end #if (qual < 2 & qual >= 1) material { metalDT } #end #if (qual < 1) material { metalNMB } #end } box { //suporte monitor <-0.1, 0.99, -0.1>, <0.1, 1.3, 0.1> material { void } } box { //monitor <-1, 1.3, -1>, <1, 3.3, 1> material { vidroDSG } } object { foto translate <-0.64, 2, 0> } translate } #if (xx < limite - 1) #declare quantas_fibras = 4; #declare quantas_jah = 0; #while (quantas_jah < quantas_fibras) union { object { conector } #if (rand(fonte) > 0.5) //direcao do fluxo da fibra #declare dir = 1; #else #declare dir = -1; #end #declare quantos = 20; #declare jah = 0; #while (jah < quantos) #declare qual = 4*rand(fonte); //3 <= x < 4 = nao tem pacote #if (qual < 3 & qual >= 2 & -15 + jah + clock*5 < 5 & -15 + jah + clock*5 > -5) object { pacote_torus translate } #end #if (qual < 2 & qual >= 1 & -15 + jah + clock*5 < 5 & -15 + jah + clock*5 > -5) object { pacote_caixa translate } #end #if (qual < 1 & qual >= 0 & -15 + jah + clock*5 < 5 & -15 + jah + clock*5 > -5) object { pacote_esfera translate } #end #declare jah = jah + 1; #end translate <5+10*xx, 0, 10*zz+((-quantas_fibras/2)+(quantas_jah+1/2))> } #declare quantas_jah = quantas_jah + 1; #end #end #if (zz < limite - 1) #declare quantas_fibras = 4; #declare quantas_jah = 0; #while (quantas_jah < quantas_fibras) union { object { conector } #if (rand(fonte) > 0.5) //direcao do fluxo da fibra #declare dir = 1; #else #declare dir = -1; #end #declare quantos = 20; #declare jah = 0; #while (jah < quantos) #declare qual = 4*rand(fonte); //3 <= x < 4 = nao tem pacote #if (qual < 3 & qual >= 2 & -15 + jah + clock*5 < 5 & -15 + jah + clock*5 > -5) object { pacote_torus translate } #end #if (qual < 2 & qual >= 1 & -15 + jah + clock*5 < 5 & -15 + jah + clock*5 > -5) object { pacote_caixa translate } #end #if (qual < 1 & qual >= 0 & -15 + jah + clock*5 < 5 & -15 + jah + clock*5 > -5) object { pacote_esfera translate } #end #declare jah = jah + 1; #end rotate <0, 90, 0> translate <10*xx+((-quantas_fibras/2)+(quantas_jah+1/2)), 0, 5+10*zz> #declare quantas_jah = quantas_jah + 1; } #end #end #declare zz=zz+1; #end #declare xx=xx+1; #end camera { location <-5, 4, -10> look_at <5, 4,0> }