// Last edited on 2017-05-07 20:05:31 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, 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 tx_pacote =
texture {
pigment{color rgb<1,0,0>}
finish{ diffuse 0.9 ambient 0.1 }
}
#macro node(p, raio)
box {
,
texture{tx_plastico}
}
#end
#macro pacote(center, raio)
sphere {
center,
raio
texture{tx_pacote}
}
#end
#macro enlace(p1, p2, isIn, rp)
union {
cylinder {
p1,
p2,
0.2
texture{tx_vidro}
}
#if(isIn = 1)
object{pacote((1-rp)*p1 + rp*p2, 0.2)}
#end
}
#end
#declare tamr = 30.5;
#macro network(n_node, n_enlace)
#declare node_position = array[n_node]
#declare node_size = array[n_node]
#declare i = 0;
#declare roleta = seed(223);
#while(i < n_node)
#declare node_position[i] = ;
#declare node_size[i] = rand(roleta);
node(node_position[i], node_size[i])
#declare i = i+1;
#end
#declare j = 0;
#while(j < n_enlace)
#declare index1 = int(rand(roleta) * n_node);
#declare index2 = int(rand(roleta) * n_node);
#if (index1 != index2)
#declare p1 = node_position[index1];
#declare p2 = node_position[index2];
object{enlace(p1, p2, (rand(roleta) < 0.9), rand(roleta))}
#end
#declare j = j+1;
#end
#end
network(100, 100)
#include "camlight.inc"
#declare centro_cena = 0.5*tamr * < 1, 1, 1 >;
#declare raio_cena = 1.10*tamr;
#declare dir_camera = <8.00, 10.00, 9.00 >;
#declare dist_camera = 8*raio_cena;
#declare intens_luz = 1.00;
camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)