// Last edited on 2017-05-07 20:05:57 by stolfilocal // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 15 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_hatEsp = texture{ pigment{ color rgb < 1, 0, 0 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_green = texture{ pigment{ color rgb < 0, 1.7, 0 > } 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 } #macro enlace(p, q, tp, rr) #declare p1 = (1-rr)*p + rr*q; #declare p2 = (1-rr)*p + rr*q; union { cylinder{ p, q, 0.15 texture { tx_hatEsp } } #if(tp != 0) box{ p1+0.5, p2-0.5 texture { tx_green } } #end } #end #declare tamr = 45.0; #declare dr = 40.0; #macro rede(N, M) union{ #declare pos = array[N] #declare tam = array[N] #declare i = 0; #declare roleta = seed(126); #while(i < N) #declare pos[i] = ; #declare tam[i] = 0.4 + rand(roleta); sphere{ <0,0,0> + pos[i], tam[i] texture {tx_plastico} } #declare i = i +1; #end #declare i = 0; #while(i < M) #declare k = int((N-1)*rand(roleta)); #declare l = int((N-1)*rand(roleta)); #if(l>=k) #declare l = l+1; #end object { enlace(pos[k], pos[l], (rand(roleta) < 0.75), rand(roleta)) } #declare i = i +1; #end } #end #declare chao = box{ <-2000,-2000,-1>, <+2000,+2000,0> } #include "eixos.inc" object { rede(100, 80) } #include "camlight.inc" #declare centro_cena = (dr + 0.5*tamr) * < 1, 1, 1 >; #declare raio_cena = 1.00*tamr; #declare dir_camera = < 35.00, -10.00, 20.00 >; #declare dist_camera = 8*raio_cena; #declare intens_luz = 1.0; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)