// 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.9 ambient 0.4 specular 0.5 roughness 0.505 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.8 ambient 0.4 } } #declare tx_farol = texture{ pigment{ color rgb < 1.00, 0.90, 0.10 > } finish{ diffuse 0.9 ambient 0.8 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.85, 0.30 > } finish{ diffuse 0.2 reflection 0.9*< 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 } } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare traseira = sphere{ < -3,0,0 >, 2.0 } #declare frente = sphere{ < 3,0,0 >, 2.0 } #declare corpo = cylinder{ <-3,0,0 >, <3,0,0>, 2.0} #declare roda = sphere{ <0,0,0>, 1.0} #declare centro_roda = cylinder{ <0,10,0>, <0,-10,0>, 0.4} #declare luz = cone{ <4,0,0>,1.8,<0,0,0>,0.2} #declare farol = sphere{ <0,0,0>, 0.3} #include "eixos.inc" // Aqui está a cena, finalmente: union{ object{ eixos(3.00) } union{ #declare numdegrau = 0; #while(numdegrau < 3) //degraus box{<0,-2*numdegrau,0>,<10,-2-2*numdegrau,1+1*numdegrau> texture{pigment{color rgb<0.439,0.858,0.858>} finish{diffuse 0.2 ambient 0.5}}} #declare numbrother = 0; #while(numbrother < 5) //vestidos cone{ <1 + numbrother*2,-1 - 2*numdegrau,1+1*numdegrau+0.4+0.06*numbrother>,1 <1 + numbrother*2,-1 - 2*numdegrau, 1+1*numdegrau+0.4+0.06*numbrother + 3 - 0.3*numbrother>,0 #if(mod(numbrother*numdegrau*0.4+numbrother+numdegrau,3) < 2) texture{pigment{color rgb<0.91,0.678,0.91>}finish{ diffuse 0.3 ambient 0.6 }} #else texture{pigment{color rgb<0.6235,0.37255,0.6235>}finish{ diffuse 0.3 ambient 0.6 }} #end } //pé 1 sphere{<1+numbrother*2 - 0.2-0.03*numbrother, -1 -2*numdegrau, 1+1*numdegrau+0.2+0.03*numbrother>, 0.2+0.03*numbrother texture{pigment{color rgb<0.8,0,0>}finish{diffuse 0.7 ambient 0.83}}} //pé 2 sphere{<1+numbrother*2 + 0.2+0.03*numbrother, -1 -2*numdegrau, 1+1*numdegrau+0.2+0.03*numbrother>, 0.2+0.03*numbrother texture{pigment{color rgb<0.8,0,0>}finish{diffuse 0.7 ambient 0.83}}} //cabeça sphere{<1+numbrother*2, -1 -2*numdegrau, 1+1*numdegrau+0.4+0.06*numbrother+3-0.3*numbrother+0.4>,0.6 texture{pigment{color rgb<0.921,0.78,0.619>}finish{diffuse 0.4 ambient 0.7}}} //mão 1 sphere{<1 + numbrother*2-0.13,-1 - 2*numdegrau+0.5,1+1*numdegrau+0.4+0.06*numbrother+((3-0.3*numbrother)/2)>, 0.25 texture{pigment{color rgb<0.921,0.78,0.619>}finish{diffuse 0.4 ambient 0.7}}} //mão 2 sphere{<1 + numbrother*2+0.13,-1 - 2*numdegrau+0.5,1+1*numdegrau+0.4+0.06*numbrother+((3-0.3*numbrother)/2)>, 0.25 texture{pigment{color rgb<0.921,0.78,0.619>}finish{diffuse 0.4 ambient 0.7}}} #declare numbrother = numbrother + 1; #end #declare numdegrau = numdegrau + 1; #end } } #include "camlight.inc" #declare centro_cena = < 5.00, -3.00, 2.00 >; #declare raio_cena = 18.0; #declare dir_camera = < 5.00, 10.00, 1.00 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)