// cor dos nos // posicao dos pacotes // iram ser escolhidos aleatoriamente teoricamente. #include "colors.inc" background{ color rgb < 0.9, 1.0, 0.95 > } light_source { < 0.00, 30.00, 30.00 > color rgb < 1.00, 1.00, 1.00 > } camera { location < 3.00, 16.00, 3.00 > right < 1.00, 0.00, 0.00 > up < 0.00, 0.00, 0.80 > sky < 0.00, 0.00, 1.00 > look_at < 7.00, 0.00, 1.00 > } #declare fonte=seed (338964); #declare fonte2=seed (192536); #declare fonte3=seed (5593479); //EIXOS #declare eixoX = cylinder{ <3, 0, 0 > <-3, 0 ,0 > 0.1 texture { pigment { color Red filter 1}} } #declare eixoY = cylinder{ <0, 3, 0 > <0, -3 ,0 > 0.1 texture { pigment { color Blue filter 1} } } //OBJETOS #declare noh = sphere {<0.00,0.00,0.00> 0.20 } #declare arvore= union{ #declare i=0; union{ object{ cylinder{ 0.05 texture { pigment { color White }} }} object {noh texture{pigment {color <(rand(fonte2))*2,rand(fonte)*1.5,rand(fonte)*1.9>}} translate } object {noh texture{pigment {color <(rand(fonte2))*2,rand(fonte)*1.5,rand(fonte)*1.9>}} translate } object{ cylinder{ 0.05 texture { pigment { color White }}}} object {noh texture{pigment {color <(rand(fonte2))*2,rand(fonte3)*1.5,rand(fonte)*1.9>}} translate } } } #declare rede = #declare i=0; #while (i<10) union{ object{arvore translate} object{arvore translate} object{arvore translate} } #declare i=i+1; #end #declare bolinha= sphere { <0, 0, 0> 0.35 texture {pigment{rgb <1,1,clock> filter 0.7 } } } #declare caixa= box{ <-.2, -.2,-.2 > < .1 ,.1 ,.1 > texture {pigment{rgb }} } #declare pacotes= #declare i=5; #while (i>0) #declare w=0; #while (w < 6) #if (rand(fonte)<.7) #declare trafego = w*rand(fonte2); object{bolinha translate } object{bolinha translate } #else #declare trafego = w*rand(fonte3); object{caixa translate <-trafego*clock + 2*w,0,- trafego*clock + 2*w>} object{caixa translate } object{caixa translate } #end #declare w=w+1; #end #declare i=i-1; #end //CENARIO union{ object{rede} object{pacotes} // object {eixoX} // object {eixoY} }