// Last edited on 2003-12-14 20:19:06 by stolfi // Exemplo de arquivo de descricao de cena para POV-ray // ====================================================================== #include "colors.inc" #declare ctr = <5,0,2>; #declare camDir = (<5,-20,6>) - (<5,0,0>); camera { location ctr + 1.00*camDir right -0.60*x up 0.60*z sky z look_at ctr } // ====================================================================== // FONTES DE LUZ light_source { 10 * < -50.0, -30.0, +50.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA #declare fonte = seed(92488); background{ color rgb < 0.75, 0.80, 0.85 > } #declare cor_vidro = <1,1,1>; #declare cor_metal = <0.9,0.9,0.9>; #declare tex_vidro = texture { finish {ambient 0 diffuse 0 reflection 0.1 specular 0.9 roughness 0.001 } pigment { color cor_vidro filter 0.85 } } #declare tex_metal = texture { pigment {rgb cor_metal} finish {ambient 0.1 diffuse 0.3 metallic reflection { 0.25 metallic } specular 0.9 roughness 0.05 } } #declare L = union { box { <0,0,0> <1,1,4> } box { <1,0,0> <3,1,1> } texture { tex_metal } } #declare I = union { box { <4,0,0> <5,1,2.5> texture { tex_metal } } sphere { <4.5,0.5,3.5> 0.2 texture { tex_metal } } sphere { <4.5,0.5,3.5> 0.5 texture { tex_vidro } interior { ior 1.33 } } } #declare V = prism { linear_sweep linear_spline 0, 1, 8, <6,0>,<7,0>,<10,3>,<9,3>,<7,1>,<7,2.5>,<6,2.5>,<6,0> texture { tex_metal } } #declare cabeca = sphere { <0,0,0> 0.8 } #declare corpo = union { difference { sphere { <0,0,0> 2 } box { <-2,-2,0> <2,2,2> } pigment { Red } } object { cabeca translate <2.4,0,0> } scale <0.2,0.2,0.2> } #declare pata4 = cone { <0,0,0>, 0.02 <0.2,0,0>, 0 } // Aqui está a cena, finalmente: union{ //-------------gregor------------ #declare i = 0; object { corpo translate <9.5,0.5,3.5> } #while(i < 7) #declare alfa = -90*rand(fonte); #declare beta = -90*rand(fonte); #declare gama = -90*rand(fonte); #declare delta = -90*rand(fonte); #declare pata3 = union { cylinder { <0,0,0> <0.2,0,0> 0.02 } object { pata4 rotate delta*y translate <0.2,0,0> } } #declare pata2 = union { cylinder { <0,0,0> <0.2,0,0> 0.02 } object { pata3 rotate gama*y translate <0.2,0,0> } } #declare pata = union { cylinder { <0,0,0> <0.2,0,0> 0.02 } object { pata2 rotate beta*y translate <0.2,0,0> } } object { pata rotate alfa*y translate <9.5,0.5,3.5> + 0.4* } #declare i = i+1; #if (i = 3) #declare i = i+1; #end #end //----------logotipo------------- box { <-0.5,0,-1> <7.5,1,-0.5> texture { tex_metal } } object { L } object { I } object { V } }