// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2019-10-05 17:48:09 by Luis Gustavo // ====================================================================== // 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_vermelho = texture{ pigment{ color rgb < 0.80, 0.10, 0.10 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_pink = texture{ pigment{ color rgb < 0.98, 0.05, 0.75 > } finish{ diffuse 0.8 ambient 0.2 specular 0.5 roughness 0.005 } } #declare tx_orange = texture{ pigment{ color rgb < 0.98, 0.20, 0.20 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.05 } } #declare tx_verde = texture{ pigment{ color rgb < 0.20, 0.90, 0.10 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.00, 0.0, 0.00 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 1.0 } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #include "eixos.inc" ////////////////////////////////// // Aqui está a cena, finalmente:// ////////////////////////////////// #declare canela_des = union { sphere{ < 0,0,0 >, 0.40 texture{ tx_plastico } } cylinder{ < 0, 0, 0 >, < 0, 2, 0 >, 0.4 texture{ tx_plastico } } } #declare corpo_des = union { sphere{ < 0,0,0 >, 0.40 texture{ tx_plastico } } cylinder{ < 0, 0, 0 >, < 0, 4, 0 >, 0.4 texture{ tx_verde } } } #declare pe_des = union { sphere{ < 0,0,0 >, 0.40 texture{ tx_plastico } } cone{ < 0,0,0>, 0.40, <0,2,0>, 0.00 texture{ tx_plastico } } } //a1 e a2 angulos de liberdade dos pés #macro pe() object{ pe_des } #end //a1 e a2 angulos de liberdade dos pés e b1 da canela #macro canela(a1,a2) union{ object{ pe() rotate translate <0,2,0> } object{ pe() rotate <-a2,0,0> translate <0,2,0> } object{ canela_des } } #end #macro canela2(a1,a2,b1) union{ object{ canela(a1,a2) rotate translate <0,2,0>} object{ canela_des } } #end #macro perna(a1,a2,b1,b2) union{ object{ canela2(a1,a2,b1) rotate translate <0,2,0>} object{ canela_des } } #end #macro inseto(a1,a2,a3,a4,a5,b1,b2,b3,b4,b5,c1,c2,c3,c4,c5,d1,d2,d3,d4,d5,e1,e2,e3,e4,e5,f1,f2,f3,f4,f5) union{ object{ perna(a1,a2,a3,a4) rotate translate <0,4,0>} object{ perna(b1,b2,b3,b4) rotate translate <0,4,0>} object{ corpo_des translate <0,4,0> } object{ perna(c1,c2,c3,c4) rotate translate <0,8,0>} object{ perna(d1,d2,d3,d4) rotate translate <0,8,0>} object{ corpo_des translate <0,8,0>} object{ perna(e1,e2,e3,e4) rotate translate <0,12,0>} object{ perna(f1,f2,f3,f4) rotate translate <0,12,0>} } #end ////Chamada da cena // object{ eixos(3.00) } inseto(60,70,20,15,20, 50,35,30,10,15, 20,15,45,15,30, 15,25,15,45,55, 30,65,5,15,33, 30,25,35,60,10) #include "camlight.inc" #declare centro_cena = < -10.00, 0.00, -5.00>; #declare raio_cena = 15.0; #declare dir_camera = < 14.00, 7.00, 4.00 >; #declare dist_camera = 50*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)