// Exemplo de arquivo de descricao de cena para POV-ray // Fabio Massanori Sendo // 09 Junho 2001 background{ color rgb < 0, 0, 1> } #include "colors.inc" camera { location <0,2,20> look_at <0,1,0> } light_source { <15, 15, 15> color White } light_source { <15, 15, 15> color White } #declare tinta_Azul = texture { pigment { color rgb < 0, 0, 1 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Verde = texture { pigment { color rgb < 0, 1, 0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Vermelho = texture { pigment { color rgb < 1, 0, 0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } // Os tres cilindros e somente para mostrar os eixos das coordenada #declare cilindroX = cylinder { < -3, 0, 0 >, < 3, 0, 0 >, 0.01 texture { tinta_Vermelho } } #declare cilindroY = cylinder { < 0,-3, 0 >, < 0, 3, 0 >, 0.01 texture { tinta_Azul } } #declare cilindroZ = cylinder { < 0, 0, -3 >, < 0, 0, 3 >, 0.01 texture { tinta_Verde} } #declare rnd = seed(7860); #declare paralelepipedo = union { box { <.75,.75,.75>, <-.75,-.75,-.75> pigment { color rgb < 1,.8, .5 > } } #declare n=20; #declare i=0; #while(i, <-j,-j,-j> pigment { color rgb < 1,.8, .5 > } translate <1,0,0> rotate <180*rand(rnd),180*rand(rnd),180*rand(rnd)> } #declare i = i+1; #end #declare i=0; #while(i, <-j,-j,-j> pigment { color rgb < 1,.8,.5> } translate <-1,0,0> rotate <180*rand(rnd),180*rand(rnd),180*rand(rnd)> } #declare i = i+1; #end #declare i=0; #while(i, <-j,-j,-j> pigment { color rgb < 1,.8,.5> } translate <0,1,0> rotate <180*rand(rnd),180*rand(rnd),180*rand(rnd)> } #declare i = i+1; #end #declare i=0; #while(i, <-j,-j,-j> pigment { color rgb < 1,.8,.5> } translate <0,-1,0> rotate <180*rand(rnd),180*rand(rnd),180*rand(rnd)> } #declare i = i+1; #end #declare i=0; #while(i, <-j,-j,-j> pigment { color rgb < 1,.8,.5> } translate <0,0,1> rotate <180*rand(rnd),180*rand(rnd),180*rand(rnd)> } #declare i = i+1; #end #declare i=0; #while(i, <-j,-j,-j> pigment { color rgb < 1,.8,.5> } translate <0,0,-1> rotate <180*rand(rnd),180*rand(rnd),180*rand(rnd)> } #declare i = i+1; #end } #declare linha = union{ #declare a = -10; #while(a<10) object{ paralelepipedo translate <2*a,-2,1>} #declare a = a+1; #end } #declare estrias = union{ #declare alt=10; cylinder { < 0, -1, 1>, < 0, alt , 1 >, .25 pigment { color rgb < .8,.8,.8 > }} cylinder { < 0, 0, -1>, < 0, alt , -1 >, .25 pigment { color rgb < .8,.8,.8 > }} cylinder { < 1, 0, 0>, < 1, alt , 0 >, .25 pigment { color rgb < .8,.8,.8 > }} cylinder { < -1, 0, 0>, < -1, alt , 0 >, .25 pigment { color rgb < .8,.8,.8 > }} } #declare coluna = difference { union{ cylinder { < 0, -1, 0 >, < 0, 7 , 0 >, 1 pigment { color rgb < .8,.8,.8 > }} } union{ object{estrias rotate 45*y} object{estrias} #declare m = 0; #while(m<50) #declare k = .25*rand(rnd); #declare f = rand(rnd); #declare g = rand(rnd); #if( (f*f + g*g) < 1.25) box { , <-k,-k,-k> pigment { color rgb < .8,.8,.8> } rotate<180*rand(rnd), 180*rand(rnd), 180*rand(rnd)> translate < f, 7, g>} #end #declare m = m+1; #end #declare m = 0; #while(m<500) #declare k = .1*rand(rnd); #declare f = rand(rnd); #declare g = rand(rnd); #declare h = 7*rand(rnd); #if( (f*f + g*g) > 0.75) box { , <-k,-k,-k> pigment { color rgb < .8,.8,.8> } rotate<180*rand(rnd), 180*rand(rnd), 180*rand(rnd)> translate < f, h, g>} #end #declare m = m+1; #end } } union { // somente para mostrar os eixos cartesianos //object{ cilindroX} // eixo X (Red) //object{ cilindroY} // eixo Y (Blue) //object{ cilindroZ} // eixo Z (Green) #declare fms = -20; #while(fms < 20) object{coluna translate <5, -5*rand(rnd), fms>} object{coluna translate <-5,-5*rand(rnd), fms>} #declare fms = fms+4; #end #declare a = -20; #while(a<20) object{ linha scale<.5,.5,.5> translate <0,0,a> } #declare a = a+1; #end }