// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2003-09-04 15:25:26 by stolfi // ====================================================================== // CÂMERA # include "textures.inc" camera { location < 40.00, 40.00, 5.00 > // Posição do observador. right -1.00*x // Largura RELATIVA da imagem. up 0.5*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 3.00, 3.00, 3.00 > // Para onde a câmera está apontando. } // Nota: os parâmetros "right" e "up" devem ter a mesma proporção // que os parâmetros ${WIDTH} e ${HEIGHT} no Makefile. // ====================================================================== // FONTES DE LUZ light_source { 10 * < +50.0, +30.0, +50.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } #declare raio = 2.000; #declare tinta_A = texture { pigment { color rgb < 0.10, 0.80, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_B = texture { pigment { color rgb < 1, 1, 1 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare cor_roda = texture { pigment { color rgb < 0,0,0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } # declare cor_vidro = < 0,0,0.5>; # declare tx_vidro = texture { pigment {rgb cor_vidro} finish { ambient 0.05 diffuse 0.55 reflection cor_vidro specular 0.20 roughness 0.05 } } # declare gerador = seed(123456); #declare ladrao = union{ box{<4,-4,0>,<-4,4,4> texture {tinta_B } translate <6,-4,0>} } #declare mao = union{ union { box {<-0.5,0.2,0>,<1.5,-0.2,1> texture {tinta_B }} cylinder {<1.5,0,0 >, <2.2,0,0>, 0.1 texture {tinta_B}} cylinder {<1.5,0,0.3 >, <2.2,0,0.3>, 0.12 texture {tinta_B}} cylinder {<1.5,0,0.6 >, <2.2,0,0.6>, 0.13 texture {tinta_B}} cylinder {<1.5,0,0.9 >, <2.2,0,0.9>, 0.12 texture {tinta_B}} cylinder {<1.2,0,1.0 >, <1.2,0,1.5>, 0.12 texture {tinta_B} } } translate <0,0,-0.5>} # declare L = 4.0; # declare R = 0.5; #declare a1 = 30*sin(clock*15*pi); #declare a2 = 20*sin(clock*pi); #declare a3 = -20*sin(clock*pi); #declare a4 = 0; #if (clock <0.5) #declare a3 = -10*sin(clock*pi*2); #declare a2 = 0; #else #declare a3=0; #declare a2 = 20*sin((clock-0.5)*pi); #end #if (clock < 0.5) #declare a4 = 0; #else #declare a4 = -30*sin((clock-0.5)*pi); #end #declare braco1 = union { cylinder {<0,0,0 >, , R texture {tinta_B}} object{ mao rotate 2*a3*z translate } // horizontal } #declare braco2 = union { cylinder {<0,0,0 >, , R texture {tinta_A}} object{ braco1 rotate a3*z rotate -a2*y translate } // vertical e horizontal } #declare braco3 = union { cylinder {<0,0,0 >, , R texture {tinta_B}} object{ braco2 rotate a3*z translate } // horizontal } #declare braco4 = union { cylinder {<0,0,0 >, , R texture {tinta_A}} object{ braco3 rotate a4*y translate } // vertical } #declare braco5 = union { cylinder {<0,0,0 >, , R texture {tinta_B}} object{ mao rotate -2*a3*z translate } # if (clock >= 0.5) union {object {ladrao} translate<0,0,-3>} #end// horizontal } #declare braco6 = union { cylinder {<0,0,0 >, , R texture {tinta_A}} object{ braco5 rotate -a3*z rotate -a2*y translate } // vertical e horizontal } #declare braco7 = union { cylinder {<0,0,0 >, , R texture {tinta_B}} object{ braco6 rotate -a3*z translate } // horizontal } #declare braco8 = union { cylinder {<0,0,0 >, , R texture {tinta_A}} object{ braco7 rotate a4*y translate } // vertical } #declare torax = union { box{<4,-2,0>,<-4,2,5> texture {tinta_A} } union {object {braco4} rotate 90*z translate <4,0,3> } union {object {braco8} rotate 90*z translate <-4,0,3>} } #declare corpo = union { box {<2,-2,6>,<-2,2,8> texture {tinta_A}} box {<2.1,-2,6.6>,<2,2,7.8> texture { cor_roda} rotate 90*z} box {<2.1,-2,7.0>,<2,2,7.5> texture { cor_roda} rotate 0*z} box {<2.1,-2,7.0>,<2,2,7.5> texture { cor_roda} rotate -90*z} box {<2.1,-2,7.0>,<2,2,7.5> texture { cor_roda} rotate 180*z} cylinder {<0,0,5 >, <0,0,7.3>, 0.8 texture {tinta_A}} object{torax} } //plane{z,-0.1 // texture{ Jade} //} #declare eixo = union { cylinder { <0,0,0 >, <1000,0,0 >, 0.05 texture { tinta_B } } cylinder { <0,0,0 >, <0,1000,0>, 0.05 texture { tinta_B } } cylinder { <0,0,0 >, <0,0,1000 >, 0.05 texture { tinta_B } } } // Aqui está a cena, finalmente: union { object {eixo } union{ #if(clock <0.5) object { corpo } translate <0,-(1-clock)*15,0> # else object { corpo } #end } #if (clock<0.5) union {object {ladrao} translate <-6,22,0> } #end rotate -120*z*clock }