// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2017-05-07 20:10:09 by stolfilocal // ====================================================================== // CORES E TEXTURAS background { color rgb < 0.74, 0.84, 0.92 > } #declare roleta = seed(11031997); #declare tx_azul = texture { pigment { color rgb <0.34, 0.45, 0.6> } finish { diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_vermelho = texture { pigment { color rgb <1, 0.1, 0.1> } finish { diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_laranja = texture { pigment { color rgb <0.96, 0.55, 0.26> } finish { diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_verde = texture { pigment { color rgb <0.34, 0.6, 0.45> } finish { diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_branco = texture { pigment { color rgb <1, 1, 1> } finish { diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #macro carroceria(PP, NH, NV) union { #declare H = 0; #while (H < NH) #declare V = 0; #while (V < NV) #declare P = array[4][4] { { PP[H][V][0][0], PP[H][V][0][1], PP[H][V][0][2], PP[H][V][0][3] }, { PP[H][V][1][0], PP[H][V][1][1], PP[H][V][1][2], PP[H][V][1][3] }, { PP[H][V][2][0], PP[H][V][2][1], PP[H][V][2][2], PP[H][V][2][3] }, { PP[H][V][3][0], PP[H][V][3][1], PP[H][V][3][2], PP[H][V][3][3] }, }; retalho(P, 0.01, tx_verde, tx_vermelho) #declare V = V + 1; #end #declare H = H + 1; #end } #end // Aqui está a cena, finalmente: #include "eixos.inc" #include "retalho-simples.inc" union { /* eixos(10) */ #declare NH = 3; //3; #declare NV = 2; /*#declare PP = array[NH][NV][4][4] { // NH = 0 { // NH = 0, NV = 0 { { < +00, +00, +00 >, < +04, +00, +02 >, < +08, +00, +04 >, < +12, +00, +06 > }, { < +00, +04, +00 >, < +04, +04, +02 >, < +08, +04, +04 >, < +12, +04, +06 > }, { < +00, +08, +00 >, < +04, +08, +02 >, < +08, +08, +04 >, < +12, +08, +06 > }, { < +00, +12, +00 >, < +04, +12, +02 >, < +08, +12, +04 >, < +12, +12, +06 > }, }, // NH = 0, NV = 1 { { < +00, +12, +00 >, < +04, +12, +02 >, < +08, +12, +04 >, < +12, +12, +06 > }, { < +00, +16, +00 >, < +04, +16, +02 >, < +08, +16, +04 >, < +12, +16, +06 > }, { < +00, +20, +00 >, < +04, +20, +02 >, < +08, +20, +04 >, < +12, +20, +06 > }, { < +00, +24, +00 >, < +04, +24, +02 >, < +08, +24, +04 >, < +12, +24, +06 > }, }, }, // NH = 1 { // NH = 1, NV = 0 { { < +12, +00, +12 >, < +19, +00, +12 >, < +26, +00, +12 >, < +33, +00, +12 > }, { < +12, +04, +12 >, < +19, +04, +12 >, < +26, +04, +12 >, < +33, +04, +12 > }, { < +12, +08, +12 >, < +19, +08, +12 >, < +26, +08, +12 >, < +33, +08, +12 > }, { < +12, +12, +12 >, < +19, +12, +12 >, < +26, +12, +12 >, < +33, +12, +12 > }, }, // NH = 1, NV = 1 { { < +12, +12, +12 >, < +19, +12, +12 >, < +26, +12, +12 >, < +33, +12, +12 > }, { < +12, +16, +12 >, < +19, +16, +12 >, < +26, +16, +12 >, < +33, +16, +12 > }, { < +12, +20, +12 >, < +19, +20, +12 >, < +26, +20, +12 >, < +33, +20, +12 > }, { < +12, +24, +12 >, < +19, +24, +12 >, < +26, +24, +12 >, < +33, +24, +12 > }, }, }, // NH = 2 { // NH = 2, NV = 0 { { < +33, +00, +06 >, < +36, +00, +04 >, < +39, +00, +02 >, < +42, +00, +00 > }, { < +33, +04, +06 >, < +36, +04, +04 >, < +39, +04, +02 >, < +42, +04, +00 > }, { < +33, +08, +06 >, < +36, +08, +04 >, < +39, +08, +02 >, < +42, +08, +00 > }, { < +33, +12, +06 >, < +36, +12, +04 >, < +39, +12, +02 >, < +42, +12, +00 > }, }, // NH = 2, NV = 1 { { < +33, +12, +06 >, < +36, +12, +04 >, < +39, +12, +02 >, < +42, +12, +00 > }, { < +33, +16, +06 >, < +36, +16, +04 >, < +39, +16, +02 >, < +42, +16, +00 > }, { < +33, +20, +06 >, < +36, +20, +04 >, < +39, +20, +02 >, < +42, +20, +00 > }, { < +33, +24, +06 >, < +36, +24, +04 >, < +39, +24, +02 >, < +42, +24, +00 > }, }, }, };*/ #declare PP = array[NH][NV][4][4] { // NH = 0 { // NH = 0, NV = 0 { { < +00, +00, +00 >, < +00, +00, +06 >, < +02, +00, +06 >, < +12, +00, +06 > }, { < +00, +04, +00 >, < +00, +04, +06 >, < +02, +04, +06 >, < +12, +04, +06 > }, { < +00, +08, +00 >, < +00, +08, +06 >, < +02, +08, +06 >, < +12, +08, +06 > }, { < +00, +12, +00 >, < +00, +12, +06 >, < +02, +12, +06 >, < +12, +12, +06 > }, }, // NH = 0, NV = 1 { { < +00, +12, +00 >, < +00, +12, +06 >, < +02, +12, +06 >, < +12, +12, +06 > }, { < +00, +16, +00 >, < +00, +16, +06 >, < +02, +16, +06 >, < +12, +16, +06 > }, { < +00, +20, +00 >, < +00, +20, +06 >, < +02, +20, +06 >, < +12, +20, +06 > }, { < +00, +24, +00 >, < +00, +24, +06 >, < +02, +24, +06 >, < +12, +24, +06 > }, }, }, // NH = 1 { // NH = 1, NV = 0 { { < +12, +00, +06 >, < +19, +00, +12 >, < +20, +00, +12 >, < +33, +00, +12 > }, { < +12, +04, +06 >, < +19, +04, +12 >, < +20, +04, +12 >, < +33, +04, +12 > }, { < +12, +08, +06 >, < +19, +08, +12 >, < +20, +08, +12 >, < +33, +08, +12 > }, { < +12, +12, +06 >, < +19, +12, +12 >, < +20, +12, +12 >, < +33, +12, +12 > }, }, // NH = 1, NV = 1 { { < +12, +12, +06 >, < +19, +12, +12 >, < +20, +12, +12 >, < +33, +12, +12 > }, { < +12, +16, +06 >, < +19, +16, +12 >, < +20, +16, +12 >, < +33, +16, +12 > }, { < +12, +20, +06 >, < +19, +20, +12 >, < +20, +20, +12 >, < +33, +20, +12 > }, { < +12, +24, +06 >, < +19, +24, +12 >, < +20, +24, +12 >, < +33, +24, +12 > }, }, }, // NH = 2 { // NH = 2, NV = 0 { { < +33, +00, +12 >, < +39, +00, +12 >, < +43, +00, +08 >, < +42, +00, +00 > }, { < +33, +04, +12 >, < +39, +04, +12 >, < +43, +04, +08 >, < +42, +04, +00 > }, { < +33, +08, +12 >, < +39, +08, +12 >, < +43, +08, +08 >, < +42, +08, +00 > }, { < +33, +12, +12 >, < +39, +12, +12 >, < +43, +12, +08 >, < +42, +12, +00 > }, }, // NH = 2, NV = 1 { { < +33, +12, +12 >, < +39, +12, +12 >, < +43, +12, +08 >, < +42, +12, +00 > }, { < +33, +16, +12 >, < +39, +16, +12 >, < +43, +16, +08 >, < +42, +16, +00 > }, { < +33, +20, +12 >, < +39, +20, +12 >, < +43, +20, +08 >, < +42, +20, +00 > }, { < +33, +24, +12 >, < +39, +24, +12 >, < +43, +24, +08 >, < +42, +24, +00 > }, }, }, }; /* #declare P = array[4][4] { { < +00, +00, +00 >, < +00, +10, +10 >, < +00, +20, -10 >, < +00, +30, +10 > }, { < +10, +00, -10 >, < +10, +10, +20 >, < +10, +20, +30 >, < +10, +30, -20 > }, { < +20, +00, -10 >, < +20, +10, +30 >, < +20, +20, +20 >, < +20, +30, -30 > }, { < +30, +00, +00 >, < +30, +10, +10 >, < +30, +20, -10 >, < +30, +30, +20 > }, }; */ carroceria(PP, NH, NV) } #include "camlight.inc" #declare centro_cena = < 15.00, 5.00, 2.00 >; #declare raio_cena = 35.0; #declare dir_camera = < -20.00, -20.00, 10.00 >; /* #declare dir_camera = < -1.00, -20.00, 1.00 >; */ #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)