// 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_a =
texture{
pigment{ color rgb < 0.80, 0.80, 1.00 > }
finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
}
#declare tx_b =
texture{
pigment{ color rgb < 0.10, 0.10, 1.00 > }
finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
}
#declare tx_c =
texture{
pigment{ color rgb < 0.80, 0.80, 0.00 > }
finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
}
#declare tx_grade =
texture{
pigment{ color rgb < 0.30, 0.30, 0.10 > }
finish{ diffuse 0.9 ambient 0.1 }
}
// ======================================================================
// DESCRI��O DA CENA
#declare roleta = seed(19);
#declare scale_roda = .2;
// Partes da cena:
#include "eixos.inc"
#include "retalho.inc"
#macro fB(p,f)
#local fator=(p.y*-.2-.7)*2.5*(.5+f);
#declare p=
;
#end
#macro fC(p)
#declare p=;
#end
#macro meioaviao(deformacao,f)
#local a12=<0,1,2>;
#local a13=<0,2,2>;
#local a14=<0,0,.4>;
#local a22=<-1,1,2>;
#local a23=<-1,2,2>;
#local a24=<-1,0,.4>;
#local a32=<-1,1,0>;
#local a33=<-1,2,0>;
#local a34=<-1,0,0>;
#local a42=<0,1,0>;
#local a43=<0,2,0>;
#local a44=<0,0,0>;
#local b12=<0,-10,3>;
#local b13=<0,-5,3>;
#local b22=<-3,-10,3>;
#local b23=<-3,-5,3>;
#local b32=<-3,-10,0>;
#local b33=<-3,-5,0>;
#local b42=<0,-10,0>;
#local b43=<0,-5,0>;
#if(mod(deformacao,2) = 1) //1 ou 3
fB(b12,f);
fB(b13,f);
fB(b22,f);
fB(b23,f);
fB(b32,f);
fB(b33,f);
fB(b42,f);
fB(b43,f);
#end
#local c11=<0,-16,7>;
#local c12=<0,-15,6>;
#local c13=<0,-14,5>;
#local c21=<-.2,-16,7>;
#local c22=<-.5,-15,6>;
#local c23=<-1,-14,5>;
#local c31=<-.2,-16,2>;
#local c32=<-.5,-15,1>;
#local c33=<-1,-14,0>;
#local c41=<0,-16,2>;
#local c42=<0,-15,1>;
#local c43=<0,-14,0>;
#if(deformacao >= 2) //2 ou 3
fC(c11)
fC(c12);
fC(c13);
fC(c21);
fC(c22);
fC(c23);
fC(c31);
fC(c32);
fC(c33);
fC(c41);
fC(c42);
fC(c43);
#end
#local a11=(a12+b13)/2;
#local a21=(a22+b23)/2;
#local a31=(a32+b33)/2;
#local a41=(a42+b43)/2;
#local b14=a11;
#local b24=a21;
#local b34=a31;
#local b44=a41;
#local b11=(b12+c13)/2;
#local b21=(b22+c23)/2;
#local b31=(b32+c33)/2;
#local b41=(b42+c43)/2;
#local c14=b11;
#local c24=b21;
#local c34=b31;
#local c44=b41;
union{
object{
retalho(
a11,a12,a13,a14,
a21,a22,a23,a24,
a31,a32,a33,a34,
a41,a42,a43,a44,
0.00000000000001,
tx_grade, tx_a)
}
object{
retalho(
b11,b12,b13,b14,
b21,b22,b23,b24,
b31,b32,b33,b34,
b41,b42,b43,b44,
0.00000000000001,
tx_grade, tx_b)
}
object{
retalho(
c11,c12,c13,c14,
c21,c22,c23,c24,
c31,c32,c33,c34,
c41,c42,c43,c44,
0.00000000000001,
tx_grade, tx_c)
}
}
#end
// Aqui est� a cena, finalmente:
union{
object{ eixos(3.00) }
union{
#local tt=4*(clock-0.5)*(clock-0.5);
object{ meioaviao(1,tt) } //nenhuma deformacao
object{ meioaviao(1,tt) scale <-1,1,1>}
object{ box{ <0,0,0> <5,1,.5> translate <0,-5,1>} texture {tx_a} }
object{ box{ <0,0,0> <5,1,.5> translate <0,-5,1> scale <-1,1,1>} texture {tx_a} }
translate <-8,-3+12*tt,-5>
}
}
#include "camlight.inc"
#declare centro_cena = < 0.00, 0.00, 1.00 >;
#declare raio_cena = 15.0;
#declare dir_camera = < 1.00, .50, .50 > ;
#declare dist_camera = 18.0;
#declare intens_luz = 1.00;
camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)