// Last edited on 2003-04-12 07:23:28 by stolfi #include "colors.inc" #include "metals.inc" #include "woods.inc" #include "glass.inc" #include "skies.inc" light_source { //fonte de luz < 0.00, 10.00, 20.00 > color rgb < 1.00, 1.00, 1.0 > } light_source { //fonte de luz < 0.00, 0.00, 20.00 > color rgb < 1.00, 1.00, 1.00 > } camera { location < 1.50, 3.50, 15.0 > // x, y, z right -1.0*x // Largura RELATIVA da imagem. //up 0.75*y // Altura RELATIVA da imagem. up < 0.00, 0.60, 0.00 > sky < 0.00, 1.00, 0.00 > //vetor que aponta para cima look_at < 0.00, 0.00, 0.00 > } background{ color rgb < 0.8,0.9,1.5 > } #if (clock <= (0.45)) #declare translacao = 12*clock; #declare translacao1y = 1; #declare rotacao1 = 1; #declare translacao2 = 1; #declare translacao3 = 1; #else #if (clock <= 1.0) #declare translacao = 5.4; #declare translacao1y = -6*clock; #declare rotacao1 = 1; #declare translacao2 = 1; #declare translacao3 = 1; #end #end #declare no1= sphere { <-3,3,0>,.5 pigment {color Blue} } #declare no2= sphere { <-3,0,0>,.5 pigment {color Yellow} } #declare no3= sphere { <-3,-3,0>,.5 pigment {color Green} } #declare enlace1= cylinder{ <-3,3,0>, <-3,0,0>,0.1 pigment {color Black} } #declare enlace2= cylinder{ <-3,0,0>, <-3,-3,0>,0.1 pigment {color Black} } #declare pacote1= torus { .25 , .2 rotate -90*x rotate -45*y translate (-2.4 + translacao)*x translate (3 + translacao1y)*y //pigment { Red } } #declare enlace1b= cylinder{ <-3,3,0>, <0,3,0>,0.1 pigment {color White} } #declare pacote2= torus { .25 , .2 //rotate -90*x //rotate -90*z translate -0.65*y //pigment { Red } } #declare enlace2b= cylinder{ <-3,0,0>, <0,0,0>,0.1 pigment {color White} } #declare pacote3= torus { .25 , .2 rotate -90*x rotate -45*y translate -2.4*x //translate -3*y //pigment { Red } } #declare enlace3b= cylinder{ <-3,-3,0>, <0,-3,0>,0.1 pigment {color White} } #declare malha= union { object{no1} object{no2} object{no3} object{enlace1} object{enlace2} object{enlace1b} object{enlace2b} object{enlace3b} } #declare malha_final= union { object{no1} object{no2} object{no3} object{enlace1} object{enlace2} } #declare fonte = seed(111353367759); #declare aux = 4*rand(fonte); #if (aux <= 0) #declare cor1 = Blue; #declare cor2 = Cyan; #declare cor3 = Red; #else #if (aux <= 1) #declare cor1 = Red; #declare cor2 = Green; #declare cor3 = Blue; #else #if (aux <= 2) #declare cor1 = Yellow; #declare cor2 = Red; #declare cor3 = Green; #else #if (aux <= 3) #declare cor1 = Green; #declare cor2 = Blue ; #declare cor3 = Yellow; #else #if (aux <= 4) #declare cor1 = Cyan; #declare cor2 = Yellow; #declare cor3 = Cyan; #end #end #end #end #end #declare rede = union { #declare i = 0; #while (i <= 8) #declare aux = 4*rand(fonte); #if (i = 0) object { pacote1 translate x*i pigment {color cor1} } object { pacote3 translate x*i pigment {color cor2} } #else object {pacote2 translate i*x pigment {color cor3} } #end object {malha translate i*x} #declare i = i + 3; #end object {malha_final translate i*x} } // Cena object {rede translate -2*x}