// 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 } } #declare tx_fosca = texture{ pigment{ color rgb < 0.70, 0.70, 0.80 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 0.80, 0.80, 0.85 > } finish{ diffuse 0.2 reflection 0.1*< 0.80, 0.80, 0.85 > 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_muro = texture{ pigment{ color rgb < 0.9, 0.30, 0.4 > } finish{ diffuse 0.9 ambient 0.1 } } #macro logotipo(texto, fase) //Separando em 2 strings #local i=1; #local n=strlen(texto); #local texto1=""; #local texto2=""; #while(i<=n) #if(mod(i,2)=0) #local texto1=concat(texto1,substr(texto,i,1)); #local texto2=concat(texto2," "); #else #local texto1=concat(texto1," "); #local texto2=concat(texto2,substr(texto,i,1)); #end #local i = i+1; #end union{ logocima(texto1, fase) logobaixo(texto2,fase) } //#debug concat("texto1:",texto1,"\n") //#debug concat("texto2:",texto2,"\n") #end #macro logocima(texto, fase) text{ttf "courbd.ttf" texto 0.5, 0.0 texture{tx_fosca} rotate 90*x rotate 90*z translate<0,0,7*(fasemax-fase)>} #end #macro logobaixo(texto, fase) text{ttf "courbd.ttf" texto 0.5, 0.0 texture{tx_fosca} rotate 90*x rotate 90*z translate<0,0,-7*(fasemax-fase)>} #end // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare chao = box{ <-15,-15,-1>, <+15,+15,0> } #declare fase = clock; #declare fasemax = 0.75; #include "eixos.inc" // Aqui está a cena, finalmente: #declare texto = "Logotipo teste" union{ //object{ eixos(5.00) } //object{ chao texture{tx_espelho} } //A imagem pára ao chegar em fasemax, ou seja o texto esta todo no logotipo #if(fase>fasemax) #local fase=fasemax; #end logotipo(texto,fase) box{<0,0,-1>, <0.25,strlen(texto)*0.7,1> texture{tx_muro} translate<0,-1, 0>} translate<0,-strlen(texto)*0.3,0> } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 7.5; #declare dir_camera = < 3.00, 0.50, 1.00 >; #declare dist_camera = 26.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)