// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2021-12-09 07:59:47 by stolfi // ====================================================================== // CORES E TEXTURAS 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 < 0.54, 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 } } // ====================================================================== // Seed #declare roleta = seed(342); // ====================================================================== // DESCRI��O DA CENA #macro arvore(P, A, K) #local k = K; #local chance = rand(roleta); #if (k = 0 ) sphere{ P, A*1.05 texture{tx_espelho} } #else #local r2 = ; #local raio2 = A*0.7; union{ cone{<0, 0, 0>, A , r2, raio2 translate P texture{tx_fosca} } sphere{ <0,0,0>, raio2 translate r2 translate P texture{tx_fosca} } #if(chance <= 0.9 ) object{arvore(<0,0,0>, raio2, k-1) rotate <-cos(k*chance*23)*30,sin(k*chance*40)*30,-sin(k*chance)*10> translate r2 translate P } #end object{arvore(<0,0,0>, raio2, k-1) rotate translate r2 translate P} } #end #end #macro plantacao(N, A, K) #local n = N; #union{ #while(n>0) #local P = ; object{arvore(<0, 0, 0>, A, K) translate P} #local n = n-1; #end } #end union{ object{plantacao(10, 0.2, 10)} } #include "camlight.inc" #declare centro_cena = < -2, 2, 2 >; #declare raio_cena = 10; #declare dir_camera = < 40, -40, 10 >; #declare dist_camera = 50*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)