// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2010-03-04 15:44:01 by stolfi // ====================================================================== // 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 } } // ====================================================================== // DESCRIÇÃO DA CENA /* #declare raio = 1.000; // Partes da cena: #declare bolinha = sphere{ < 0,0,0 >, 0.60 } #declare bolota = sphere{ < 0,0,0 >, 1.50 } #declare bola = sphere{ < 0.00, 0.00, 0.00 >, raio texture{ tx_plastico } } #declare pino = cylinder{ < -2.00, +2.00, -1.00 >, < +2.00, -2.00, +1.00 >, 0.75 texture{ tx_vidro } } #declare furo = cylinder{ < +1.00, +2.00, -2.00 >, < -1.00, -2.00, +2.00 >, 0.75*raio texture{ tx_espelho } } #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } */ #include "eixos.inc" #macro cabeca () sphere{ < 0,0,3 >, 0.5 texture{ tx_plastico } } #end #macro pescoco () cylinder{ <0,0,2.3>,<0,0,2.5>,0.1 texture{ tx_plastico } } #end #macro pe () box{ <0,0,0>,<0.6,0.2,0.1> texture{ tx_plastico } } #end #macro mao () box{ <0,0,0>,<0.2,0.6,0.1> texture{ tx_plastico } } #end #macro corpo () box{ <0.3,-0.3,1>,<-0.3,0.3,2.3> texture{ tx_plastico } } #end #macro orelha () cone{ <0,0,0>,0.2,<0,0,0.2>,0.1 texture{ tx_plastico } } #end #macro coxa () cylinder{ <0,0,0>,<0,0,-0.8>,0.07 texture{ tx_plastico } } #end #macro peinf () cylinder{ <0,0,0>,<0,0,-0.4>,0.07 texture{ tx_plastico } } #end #macro subperna(a) union{ object{ peinf() } object{ pe() rotate<0,a,0> translate<0,-0.09,-0.4>} } #end #macro perna(a,b) union{ object{ coxa() } object{ subperna(a) rotate<0,b,0> translate<0,0,-0.8> } } #end #macro antebraco() cylinder{ <0,0,0>,<0,0.4,0>,0.07 texture{ tx_plastico } } #end #macro subbraco(a) union{ object{ antebraco() } object{ mao() rotate translate<0,0.4,0>} } #end #macro muc() cylinder{ <0,0,0>,<0,0.4,0>,0.07 texture{ tx_plastico } } #end #macro braco(a,b) union{ object{ muc() } object{ subbraco(b) rotate translate<0,0.4,0> } } #end // Aqui está a cena, finalmente: object{ eixos(3.00) } #macro boneco(a,b,c,d,e,f,g,h,i,j) union{ object { cabeca() } object { pescoco() } object { corpo() } object { orelha() rotate <-30,0,0> translate <0,0.3,3.4> } object { orelha() rotate <30,0,0> translate <0,-0.3,3.4> } object { perna(a,b) rotate<0,i,0> translate<0,0.2,1> } object { perna(c,d) rotate<0,j,0> translate<0,-0.2,1> } object { braco(e,f) translate<0,0.3,2> } object { braco(g,h) translate<0,0.3,2> scale<1,-1,1> } } #end object { boneco(30,21,30,45,55,62,71,30,12,34) translate<0,-2,0>} object { boneco(10,20,30,40,50,-10,-20,-30,-40,35) translate<0,2,0>} #include "camlight.inc" #declare centro_cena = < 1.00, 0.00, 0.00 >; #declare raio_cena = 6.0; #declare dir_camera = < 7.00, -1.00, 4.00 >; #declare dist_camera = 80.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)