// 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.9, 0.9, 0.9 > } #declare tx_plastico = texture{ pigment{ color rgb < 1.00, 1.00, 0.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_roda = texture{ pigment{ color rgb < 0.40, 0.9, 1.0 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_campo = texture{ pigment{ color rgb < 0.20, 1.0, 0.3 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{color rgb < 1.00, 0.00, 0.00 > } finish{ diffuse 0.9 ambient 0.3 } } #declare tx_palmeiras = texture{ pigment{color rgb < 0.00, 1.00, 0.00 > } finish{ diffuse 0.9 ambient 0.3 } } #declare tx_sp = texture{ pigment{color rgb < 1.00, 0.00, 0.00 > } finish{ diffuse 0.9 ambient 0.3 } } #declare tx_espelho = texture{ pigment{ color rgb < 0.50, 0.50, 0.80 > } finish{ diffuse 0.2 reflection 0.7 ambient 0.1 } } #declare tx_cabeca = texture{ pigment{ color rgb < 0.9, 0.40, 0.50 > } finish{ diffuse 0.2 reflection 0.7 ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.5, 0.7, 0.90 >} finish{ diffuse 0.3 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } // ====================================================================== // DESCRIÇÃO DA CENA #declare raio = 2.000; #declare boneco = union{ cone{< 0.0, 0, 0.00 >, 0.05,< 0.00, 0, 0.2 >, 0.1 texture{ tx_vidro } } sphere{ < 0,0, 0.3 >, 0.1 texture{ tx_espelho }} } #declare campo = box{ <0,4,0>, <-6,-5,0.01> texture{ tx_campo }} #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #declare cadeira= box{ <0,0,0>, <0.4,0.2,0.05> texture{tx_plastico}} #macro constroi(degraus, cadeiras, largura, rotacao, transx, transy) union{ #declare i=1; #while (i, <0.4*i,largura,0.3*i> translate rotate rotacao*z texture{ tx_roda } } #declare j=1; #while (j rotate rotacao*z} sphere{ < 0,0, 0.3 >, 0.1 translate <(0.4*(i-1))+0.1+transx,((j-1)*0.3)+0.1 +transy,0.3*i> rotate rotacao*z texture{tx_cabeca}} #if (rand(roleta)<0.25) cone{< 0.0, 0, 0.00 >, 0.05,< 0.00, 0, 0.2 >, 0.1 translate <(0.4*(i-1))+0.1+transx,((j-1)*0.3)+0.1 +transy,0.3*i> rotate rotacao*z texture{tx_sp}} #else cone{< 0.0, 0, 0.00 >, 0.05,< 0.00, 0, 0.2 >, 0.1 translate <(0.4*(i-1))+0.1+transx,((j-1)*0.3)+0.1 +transy,0.3*i> rotate rotacao*z texture{tx_palmeiras}} #end #declare j=j+1; #end #declare i=i+1; #end } #end #include "eixos.inc" #declare roleta = seed(315); constroi (15,14, 4, 0, 0, 0) constroi (15,14, 4, 0, 0, -5) constroi (15,20, 6, 90, 4 , 0) constroi (15,20, 6, -90, 5 , -6) constroi (15,30, 9, 180, 6 , -4) union{ object{ eixos(3.00) } object{ chao texture{ tx_xadrez } } object{ campo } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 22.0; #declare dir_camera = < -10.00, 8.00, 8.00 >; #declare dist_camera = 60.0; #declare intens_luz = 0.93; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)