// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2003-06-28 14:17:54 by stolfi #include "colors.inc" #include "stones.inc" background{ Gray90 } #declare ctr = < 0.00, 0.00, 2.00 >; #declare cam = < 8.00, 0.30, 2.00 >; camera { location ctr + 0.75*cam right 1.2*x up 0.9*y sky z look_at ctr } light_source { ctr + 100*vrotate(cam + 3.0*y, -40*y) color 1.2*White } light_source { ctr + 100*vrotate(cam + 1.0*y, +55*y) color 0.5*White } light_source { ctr + 100*vrotate(cam + 0.1*y, +15*y) color 0.8*White } #declare tinta_verde = texture { pigment { color rgb 2*< 0.00, 1.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_preta = texture { pigment { color rgb < 0.00, 0.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_azul = texture { pigment { color rgb < 0.40, 0.60, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_vermelha = texture { pigment { color rgb < 1.00, 0.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } // dimensoes #declare r1 = 0.4; #declare h1 = 0.5; #declare objA = cylinder {<0,0,0>, <0,0,3*h1>, r1 texture{tinta_vermelha}} #declare objB = difference { box {<2*h1, -2*h1, 0>, <-2*h1, 2*h1, h1>} cylinder {<0,0,-h1>, <0,0,2*h1>, 1.2*r1} texture{tinta_azul } } #declare objC = difference { box {<0, -2*h1, 0>, <-2*h1, 2*h1, 3*h1>} box {<1, -2.1*h1, 0.9*h1>, <-(2*h1-r1), 2.1*h1, 2.1*h1>} cylinder{<0,0,-1>, <0,0,4*h1>, 1.2*r1} texture{T_Stone16} } // Aqui está a cena, finalmente: union { #if (clock <= 0.3) #declare z1 = 2.5 -2.5*(clock/0.3); object { objA translate<-1,1, z1> } object { objB translate<-1,1,-0.5> } #end #if ((clock > 0.3)&(clock<=0.6)) object { objA translate<-1,1, 0> } object { objB translate<-1,1,-0.5> } object { objC translate<-1,-1,-0.5> rotate <0,0,45>} #end // Faltou cena quando clock > 0.6! }