// Last edited on 2017-05-07 20:05:20 by stolfilocal // Processed by remove-cam-lights background{ color rgb < 0.90, 0.95, 1.00 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.85, 0.30 > } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } #declare roleta = seed(417); #declare raio = 7; #macro um_no(posicao, tamanho) sphere {posicao,tamanho texture{tx_fosca}} #end #macro dois_nos() #declare pos1 = <0,0,0>; #declare pos2 = <0,10,12>; union { sphere {pos1,raio texture{tx_fosca}} sphere {pos2,raio texture{tx_fosca}} cylinder {pos1,pos2,0.1*raio texture{tx_fosca}} cone { pos1+(pos2-pos1)*0.45, 0.3*raio pos1+(pos2-pos1)*0.55, 0.1*raio texture{tx_plastico}} } #end #macro enlace(p,q,tp,rp) union { cylinder {p,q,0.1*raio texture{tx_fosca}} #if(tp) cone { p+(q-p)*rp, 0.3*raio p+(q-p)*(rp+0.02), 0.1*raio texture{tx_plastico}} #end } #end #declare tamr = 700; #macro rede(N,M) #declare todos_nos = array[N] #declare enlaces1 = array[M] #declare enlaces2 = array[M] #declare i = 0; #while(i - tamr/2; #declare i = i+1; #end #declare i = 0; #while(i; #declare raio_cena = 1.00*tamr; #declare dir_camera = < 3.00, 5.00, 2.00 >; #declare dist_camera = 8*raio_cena; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)