// 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 > } #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 -1.5*x translate 3*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 -45*y translate -1.5*x //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 -1.5*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(3567759); #declare rede = union { #declare i = 0; #while (i <= 8) #declare aux = 4*rand(fonte); #if (aux < 3) object {pacote1 translate i*x pigment {color Green} } object {pacote2 translate i*x pigment {color Blue} } object {pacote3 translate i*x pigment {color Yellow} } #else object {pacote1 translate i*x pigment {color Red} } object {pacote2 translate i*x pigment {color Red} } object {pacote3 translate i*x pigment {color Red} } #end object {malha translate i*x} #declare i = i + 3; #end object {malha_final translate i*x} } // Cena object {rede translate -2*x}