// 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_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 robo(ra_x,ra_y,ra_z,rfa_y,la_x,la_y,la_z,lfa_y,rt_x,rt_y,rt_z,rc_x,rf_x,lt_x,lt_y,lt_z,lc_x,lf_x) union { box{ <-3,-2,-5>, <+3,+2, 5> texture{tx_fosca}} object{ arm(rfa_y) rotate ra_z*x rotate ra_y * y rotate ra_x*x translate <3.5,0,3>} object{ arm(lfa_y) rotate la_z*x rotate la_y * y rotate la_x*x scale <-1,1,1> translate <-3.5,0, 3> } object{ thigh(rc_x,rf_x) rotate rt_z*x rotate rt_y * y rotate rt_x*x translate <-2,0,-5>} object{ thigh(lc_x,lf_x) rotate lt_z*x rotate lt_y * y rotate lt_x*x translate <2,0,-5>} } #end #macro arm(y_rotation) union { sphere{ <0,0,0>, 0.8 texture{tx_espelho}} cylinder{<0,0,0>, <6,0,0>,0.5 texture{ tx_plastico}} object{ forearm() rotate <0,y_rotation,0> translate <6,0,0>} } #end #macro forearm() union { sphere{ <0,0,0>, 0.8 texture{tx_espelho}} cylinder{<0,0,0>, <4,0,0>, 0.5 texture{ tx_plastico}} sphere{ <4,0,0>, 0.8 texture{tx_espelho}} } #end #macro thigh(calf_x_rotation,feet_x_rotation) union { sphere{ <0,0,0>, 0.8 texture{tx_espelho}} cylinder{<0,0,0>, <0,0,-6>, 0.5 texture{ tx_plastico}} object {calf(feet_x_rotation) rotate translate <0,0,-6>} } #end #macro calf(feet_x_rotation) union { sphere{ <0,0,0>, 0.8 texture{tx_espelho}} cylinder{<0,0,0>, <0,0,-5>, 0.5 texture{ tx_plastico}} object {feet() rotate translate <0,0,-5>} } #end #macro feet() union{ sphere{ <0,0,0>, 0.8 texture{tx_espelho}} box{ <-1,3,-1.5> , <1,-1,-0.5> texture{tx_plastico}} } #end union{ object{robo(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) translate <-40,0,0>} object{robo(180,0,0,45,0,-45,0,-45,0,0,0,-45,0,0,0,0,-45,0)} object{robo(45,90,-45,30,-45,90,30,0,45,0,0,-45,45,-45,0,0,-45,45) translate <40,0,0>} } #include "camlight.inc" #declare centro_cena = < 0, 0, 0 >; #declare raio_cena = 120; #declare dir_camera = < 10, 10, 5 >; #declare dist_camera = 100*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)