//aleatorio: //-cor dos nos //-posicao dos pacotes //-forma->cubo/esfera #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 < 0.00, 16.00, 0.00 > right < -0.60, 0.00, 0.00 > up < 0.00, 0.00, 0.80 > sky < 0.00, 0.00, 1.00 > look_at < 0.00, 0.00, 0.00 > } //TEXTURAS E CORES #declare fonte=seed (338964); #declare fonte2=seed (292536); #declare fonte3=seed (493479); //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 = torus{ .3 .2 // texture {tx_espelho} } #declare grade= union{ #declare i=-2; #while (i<3) union{ object{ cylinder{ <-4,0,i*2> <4,0,i*2> 0.05 texture { pigment { color White }} }} object{ cylinder{ 0.05 texture { pigment { color White }} }} } #declare i=i+1; #end } #declare nohs = union{ #declare te=clock/.5; #declare i=-2; #while (i<3) #declare j=-2; #while (j<3) object{ noh rotate z*360*te translate texture{pigment {color <(rand(fonte2))*2,rand(fonte)*1.5,rand(fonte)*1.9>}} } #declare j=j+1; #end #declare i=i+1; #end } #declare bola= sphere { <0, 0, 0> 0.40 } #declare cubo= box{ <-.3, -.3,-.3 > < .3 ,.3 ,.3 > } #declare pacote1= #if (rand(fonte)<.7) object{bola texture{pigment{ rgb }}} #else object{cubo texture{pigment {rgb }}} #end #declare pacote3= #if (rand(fonte)<.7) object{bola texture{pigment{ rgb }}} #else object{cubo texture{pigment {rgb }}} #end #declare pacote2= #if (rand(fonte)<.7) object{bola texture{pigment{ rgb }}} #else object{cubo texture{pigment {rgb }}} #end #declare caminho2= #declare ti=13*clock; //primeiro pacote #if ((-3+ti)<=4) object {pacote2 translate <-3+ti,0,4 > } #else object {pacote2 translate <4,0,4-((-3+ti)-4) > } #end //segundo pacote #declare ti=15*clock -1; #if ((-3+ti)<=4) object {pacote2 translate <-3+ti,0,4 > } #else object {pacote2 translate <4,0,4-((-3+ti)-4) > } #end #declare caminho1= #declare ti=5*clock; union{ object {pacote1 translate <-2,0,-3+ti > } object {pacote1 translate <-2,0,-3+ti +1 > } object {pacote1 translate <-2,0,-3+ti +2 > } } #declare caminho3= #declare ti=20*clock; #if ((-4+ti)<=2) object {pacote3 translate <-4+ti,0,2 > } #else #if((8-ti)>=-4) object {pacote3 translate <2,0,2-((-4+ti)-2) >}//4-(-4+ti) #else #if((14-ti)>=-2) object {pacote3 translate <2+(8-ti)+4,0,-4 >} #else object {pacote3 translate <-2,0,-4-((14-ti)+2) >} #end #end #end //CENA union{ object{nohs} object{grade} object {caminho1} object {caminho2} object {caminho3} }