// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2020-09-30 19:57:13 by jstolfi // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_verde = texture{ pigment{ color rgb < 0.15, 1.00, 0.15 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_vermelho = texture{ pigment{ color rgb < 1.00, 0.10, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_azul = texture{ pigment{ color rgb < 0.10, 0.10, 1.00 > } finish{ diffuse 0.9 ambient 0.1 } } // ====================================================================== // DESCRIÇÃO DA CENA // MACROS QUE CONSTITUEM OS OBJETOS DA CENA #macro alien() #local R_esfera = 10.0; #local R_maior_cone = 5; #local R_menor_cone = 0; union{ sphere{ < 0, 0, 0 >, R_esfera texture{ tx_verde } } cone{ < -15, 0, 0 >, R_maior_cone < -20, 0, 0 >, R_menor_cone texture{ tx_vermelho } } box{ < -10, -5, 5 >, < -15, 5, -5 > texture{ tx_azul } } } #end #macro foguete() #local R_cilindro = 5.0; #local R_maior_cone = 5; #local R_menor_cone = 0; #local R_esfera = 5.0; union{ cylinder{ < -105, 0, 0 >, < -125, 0, 0 >, R_cilindro texture{ tx_verde } } cone{ < -105, 0, 0 >, R_maior_cone < -90, 0, 0 >, R_menor_cone texture{ tx_vermelho } } sphere{ < -125, 0, 0 >, R_esfera texture{ tx_azul } } } #end #include "eixos.inc" // Aqui está a cena, finalmente: #local N_alien = 4; #local M_alien = 9; #local i_alien = 0; #while(i_alien < N_alien) #local j_alien = 0; #while(j_alien < M_alien) #if (sin(15*i_alien*j_alien) > -0.7) object{ alien() translate } #end #local j_alien = j_alien + 1; #end #local i_alien = i_alien + 1; #end #local N_foguete = 6; #local M_foguete = 7; #local i_foguete = 0; #while(i_foguete < N_foguete) #local j_foguete = 0; #while(j_foguete < M_foguete) #if (sin(15*i_foguete*j_foguete) > -0.6) object{ foguete() translate } #end #local j_foguete = j_foguete + 1; #end #local i_foguete = i_foguete + 1; #end //object{ alien() } //object{ foguete() } #include "camlight.inc" #declare centro_cena = < -100, 450, 200 >; #declare raio_cena = 300; #declare dir_camera = < 0, 120.00, 20.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)