// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2003-07-31 12:50:37 by stolfi // ====================================================================== // CÂMERA #include "colors.inc" camera { location < -10.00, -8.00, 10 > // Posição do observador. right <-0.6,0,0> // Largura RELATIVA da imagem. up <0,0,0.8> // Altura RELATIVA da imagem. sky <0,0,1> // Qual direção é "para cima"? look_at < 2.00, 0.00, 1.50 > // Para onde a câmera está apontando. } // Nota: os parâmetros "right" e "up" devem ter a mesma proporção // que os parâmetros ${WIDTH} e ${HEIGHT} no Makefile. // ====================================================================== // FONTES DE LUZ light_source { 10 * < -50.0, -30.0, +50.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } #declare fonte = seed(86775); #declare chao = plane { z,0 pigment {Green} } #declare computador = union { box { <0,0,0.3> <1,1,1.3> pigment {rgb <0.9,0.9,0.9>} finish { diffuse 0.5 specular 0.05 roughness 0.005 ambient 0.1 } } box { <0.15,-0.02,0.5> <0.85,0.02,1.2> pigment { rgb <0.3,0.3,0.9> } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } box { <-0.1,-0.1,0> <1.1,1.1,0.27> pigment {rgb <0.9,0.9,0.9>} finish { diffuse 0.5 specular 0.05 roughness 0.005 ambient 0.1 } } } #declare conexaoX = cylinder { <-0.1,0.5,0.135> <-1.9,0.5,0.135> 0.09 pigment { rgb <0,0,0> } } #declare conexaoY = cylinder { <0.5,-0.1,0.135> <0.5,-1.9,0.135> 0.09 pigment { rgb <0,0,0> } } #declare pacote1 = sphere { <0,0,0> 0.2 pigment { Red } } #declare pacote2 = sphere { <0,0,0> 0.2 pigment { White } } #declare pacote3 = sphere { <0,0,0> 0.2 pigment { Blue } } #declare pacote4 = sphere { <0,0,0> 0.2 pigment { Yellow } } #declare linha = union { object { computador } #declare i = 1; #while (i <= 5) object { conexaoX translate <3*i,0,0> } object { computador translate <3*i,0,0> } #declare r = rand(fonte); #declare r2 = 1.8*rand(fonte); #if (r <= 0.2) object { pacote1 translate <3*i - r2,0.5,0.135> } #end #if ( (0.2 < r) & (r <= 0.4) ) object { pacote2 translate <3*i - r2,0.5,0.135> } #end #if ( (0.4 < r) & (r <= 0.6) ) object { pacote3 translate <3*i - r2,0.5,0.135> } #end #if ( (0.6 < r) & (r <= 0.8) ) object { pacote4 translate <3*i - r2,0.5,0.135> } #end #declare i = i+1; #end } #declare rede = union { object { linha } #declare i = 1; #while (i <= 3) #declare j = 0; #while (j <= 5) object { conexaoY translate <3*j,3*i,0> } #declare r = rand(fonte); #declare r2 = 1.8*rand(fonte); #if (r <= 0.2) object { pacote1 translate <3*j+0.5,3*i-r2,0.135> } #end #if ( (0.2 < r) & (r <= 0.4) ) object { pacote2 translate <3*j+0.5,3*i-r2,0.135> } #end #if ( (0.4 < r) & (r <= 0.6) ) object { pacote3 translate <3*j+0.5,3*i-r2,0.135> } #end #if ( (0.6 < r) & (r <= 0.8) ) object { pacote4 translate <3*j+0.5,3*i-r2,0.135> } #end #declare j = j+1; #end object { linha translate <0,3*i,0> } #declare i = i+1; #end } // Aqui está a cena, finalmente: union{ object { chao } object { rede } }