// Pedro Teixeira Figueiredo RA: 123198 background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_metalico = texture{ pigment{ color rgb < 0.60, 0.60, 0.60 > } finish{ diffuse 0.8 ambient 0.5 specular 0.8 roughness 0.005 } } #declare tx_laranja = texture{ pigment{ color rgb < 0.9, 0.5, 0.3 > } finish{ diffuse 0.6 ambient 0.5 specular 0.8 roughness 0.005 } } #declare tx_verde = texture{ pigment{ color rgb < 0.3, 0.9, 0.2 > } finish{ diffuse 0.6 ambient 0.5 specular 0.8 roughness 0.005 } } #declare tx_escuro = texture{ pigment{ color rgb < 0.3, 0.3, 0.3 > } finish{ diffuse 0.8 ambient 0.5 specular 0.8 roughness 0.005 } } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare botao_quadrado = box{ < -0.2, -0.3, -0.3 >, < +0.2, +0.3, +0.3 > } #declare botao_redondo = sphere{ < -0.2, 0.00, 0.00 >, 0.4 } #declare analog = sphere{ < -0.25, 0.00, 0.00 >, 0.5 texture { tx_escuro } } #include "eixos.inc" // MACROS ============================================================== // m = numero de linhas, n = numero de colunas #macro cria_painel (m, n) #declare painel = box{ <-1,-n/2, -m/4>, <0, +n/2, +m/4> texture{ tx_metalico } } union { object{ painel translate <0,0,0> } #declare i = 0; #while (i #if (mod(i,2)) texture { tx_laranja } #else texture { tx_verde } #end } #declare j=j+1; #end #declare i=i+1; #end #declare i = 0; #while (i #if (mod(j,2)) texture { tx_laranja } #else texture { tx_verde } #end } #declare j=j+1; #end #declare i=i+1; #end object{ analog translate < 0, -n/4 , -m/4+0.5 > } object{ analog translate < 0, +n/4 , -m/4+0.5 > } } #end // CENA ================================================================ union{ object{ eixos(3.00) } object { cria_painel(8,8) } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 6.0; #declare dir_camera = < 14.00, 0.00, 0.00 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)