// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2010-03-04 15:44:01 by stolfi // ====================================================================== // CORES E TEXTURAS #include "colors.inc" background{ color rgb < 0.75, 0.80, 0.85 > } //antigo plastico: rgb < 0.90, 0.80, 1.00 > } #declare tx_plastico = texture{ pigment{ color Grey } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color Black } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 0.00, 0.74, 0.90 > } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 } } #declare tx_espelho1 = 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 } } #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.10, 0.92, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare mao = sphere { <0,0,0>, 0.7 pigment { color Grey } } #declare rosto = sphere { <0,0,0>, 2 pigment { color Grey } } #declare bigode = box { <0,0,0>, <1.3,0,0.1> pigment { color Black } } #declare boca = cone { <0,0,0>, 0.2 <0,0,0.15>, 0.3 pigment { color Red } } #declare nariz = cone { <0,0,0>, 0.1 <0,0,0.5>, 0.3 pigment { color Black } } #declare olho = sphere { <0,0,0>, 0.5 pigment { color Green } } #declare orelha = cone { <0,0,0>, 0.7 <0,0,1.4>, 0 pigment { color Grey } } #macro cabeca() union { object { rosto } object { olho translate <0.6,1.4,0.7> } object { olho translate <-0.6,1.4,0.7> } object { nariz translate <0,1.8,-0.6> } object { boca translate <0,1.5,-1.3> } object { bigode translate <0.2,1.9,-0.4> } object { bigode translate <-1.7,1.9,-0.4> } object { bigode translate <0.2,1.9,-0.25> rotate -5*y } object { bigode translate <-1.7,1.9,-0.25> rotate 5*y } object { bigode translate <0.2,1.9,-0.55> rotate 5*y } object { bigode translate <-1.7,1.9,-0.55> rotate -5*y } object { orelha translate <-0.3,0,1.7> rotate -20*y } object { orelha translate <0.3,0,1.7> rotate 20*y} } #end #macro pe() difference { object { cone { <0,0,0>, 0.8 <0,0,1>, 0.5 pigment { color Grey } } } object { box { <0,-1,-1.3>, <-1,1,1.3> pigment { color Grey } } } } rotate <0,-90,0> #end #macro canela() cone { <0,0,-1.3>, 0.55 <0,0,0>, 0.65 pigment { color Grey } } #end #macro coxa() cone { <0,0,-1.3>, 0.65 <0,0,0>, 0.75 pigment { color Grey } } #end #macro anteperna(b) union{ object { canela() } object { pe() translate <-0.53,0,-1.3> rotate -b*z } } #end #macro perna(a, b) union{ object { coxa() } object { sphere { <0,0,0>, 0.65 pigment { color Grey } } translate <0,0,-1.1> } object { anteperna(b) rotate -a*y translate <0,0,-1.1> } } #end #macro antebraco() union{ object { cone { <0,0,-1.3>, 0.5 <0,0,0>, 0.65 pigment { color Grey } } } object { mao translate <0,0,-1.3>} } #end #macro biceps() object { cone { <0,0,-1.3>, 0.65 <0,0,0>, 0.75 pigment { color Grey } } } #end #macro braco(a) union{ object { biceps() } object { sphere { <0,0,0>, 0.65 pigment { color Grey } } translate <0,0,-1.1> } object { antebraco() rotate -a*y translate <0,0,-1.1> } } #end #macro corpo() sphere { <0,0,0>, 2.5 pigment { color Grey } } #end #macro gato(al,bl,cl, a,b,c, d, e, dl, el) union{ object { cabeca() translate <0,0,4.3>} object { corpo() } object { perna(a,b) rotate c*y translate <-1.3,0,-1.8>} object { perna(al,bl) rotate -cl*y translate <1.3,0,-1.8> } object { braco(d) rotate e*y translate <-1.7,0,0.8> } object { braco(dl) rotate -el*y translate <1.7,0,0.8> } } #end #include "eixos.inc" // Aqui está a cena, finalmente: union{ object { gato(-60,180,10,60,0,10,-40,60,45,60) translate <-15,0,0>} object { gato(0,0,10,0,0,10,0,60,0,60) } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 30.0; #declare dir_camera = <0,1,0>;//< 14.00, 7.00, 4.00 >; #declare dist_camera = 50.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)