// 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, 0.40 > } 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_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; // Partes da cena: #declare bolaroda = sphere{ < 0.2,0,-0.2 >, 0.2 } #declare bolacorpo = sphere{ < 0.7,0,1.0 >, 0.5 } #declare base = cylinder{ < 0.0, 0.00, 0.50 >, < 1.40, 0.00, 0.50 >, 0.50 texture{ tx_fosca } } #declare conetaxi = cone{ < 0.70, 0.00, 1.40 >, 0.2, < 0.70, 0.00, 1.6 >, 0.1 texture{ tx_fosca } } #declare farol = cone{ < 0.1, 0.1, 0.0 >, 0.1, < 1.60, 0.00, 0.5 >, 0.2 texture{ tx_fosca } } #declare boneco = union{ cone{ < 0.0, 0, 0.00 >, 0.05, < 0.00, 0, 0.3 >, 0.1 texture{ tx_vidro } } sphere{ < 0,0, 0.4 >, 0.1 texture{ tx_espelho }} cylinder{ < 0.0, -0.15, 0.15 >, < 0.0, 0.15, 0.15 >, 0.05 texture{ tx_plastico } } } #declare boneco_doido = union{ cone{ < 0.0, 0, 0.00 >, 0.05, < 0.00, 0, 0.3 >, 0.1 texture{ tx_fosca } } sphere{ < 0,0, 0.4 >, 0.1 texture{ tx_cabeca }} cylinder{ < 0.0, -0.15, 0.15 >, < 0.0, 0.15, 0.15 >, 0.05 texture{ tx_plastico } } } #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #include "eixos.inc" // Aqui está a cena, finalmente: union{ object{ eixos(3.00) } object{ chao texture{ tx_xadrez } } #declare i=1; #while (i<5) box{ <0.4*(i-1),0, 0>, <0.4*i,3,0.5*i> texture{ tx_roda } } #declare j=1; #while (j<10) #if (j=2*i) object{ boneco_doido translate <(0.4*(i-1))+0.2,((j-1)*0.3)+0.3 ,0.5*i>} #else object{ boneco translate <(0.4*(i-1))+0.2,((j-1)*0.3)+0.3 ,0.5*i> } #end #declare j=j+1; #end #declare i=i+1; #end } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 4.0; #declare dir_camera = < -4.00, -2.00, 2.00 >; #declare dist_camera = 4.0; #declare intens_luz = 0.93; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)