// Last edited on 2013-11-04 20:15:45 by stolfilocal // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.80, 0.80, 0.4 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca2 = texture{ pigment{ color rgb <1, 0.40, 0.7 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca3 = texture{ pigment{ color rgb < 0.8, 0.10, 0.1 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_vermelho = texture{ pigment{ color rgb < 1, 0.5, 0.5 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca = texture{ pigment{ color rgb < 0.7, 0.7, 0.3 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.85, 0.30 > } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.3, 0.4, 0.55 > filter 0.70 } finish{ diffuse 0.03 reflection 1 ambient 0.1 specular 0.25 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.70, 0.70, 0.90 >, color rgb < 0.80 ,0.80, 1.00 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } #declare raio = 2.000; #declare bola = sphere{ < 0.00, 0.00, 0.00 >, 0.30 texture{ tx_fosca3 } } #declare chapa = sphere{ < 0.00, 0.00, 0.00 >, 0.50 texture{ tx_vidro } } #declare buraco = sphere{ < 0.00, 0.00, 0.00 >, 0.60 } #declare pino1 = cylinder{ < 0,0,0 >, < 0,0,1 >, 0.025 texture{ tx_vidro } } #declare pino2 = cylinder{ < 0,0,0.6 >, < 0,0,1 >, 0.05 texture{ tx_vermelho } } #declare alca = torus{ 0.14,0.15 texture{ tx_vidro} } #declare botao_redondo = cylinder{ <0,0,0>, <0.025,0,0>, 0.1 texture{ tx_fosca3 } } #declare botao_quadrado = box{ <0,0,0>, <0.025,0.2,0.2> } #declare placa = box{ <0,0,0>, <0.025,0.2,0.2> texture{ tx_vidro } } #declare placa2 = box{ <0,0,0>, <0.025,0.2,1> texture{ tx_vidro } } #declare luz = sphere{ < 0.00, 0.00, 0.00 >, 0.05 texture{ tx_vermelho } } #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #include "eixos.inc" # declare botonluz = union{ object{placa} object{luz translate<0.01,0.1,0.1>} } #macro botonsOnOff(n) union{ #declare i = 0; #while (i < 2*n) #if (i < n) #if(mod(i,2) = 0) object{botao_redondo translate<0.25, 0.2 ,0.3 + (i*0.3)>} #else object{botonluz translate<0.25, 0.2 ,0.3 + (i*0.3)>} #end #else #if(mod(i,2) = 0) object{botao_redondo translate<0.25, 0.5,0.3 + ((i-n)*0.3)>} #else object{botonluz translate<0.25,0.5,0.3 + ((i-n)*0.3)>} #end #end #declare i = i + 1; #end } #end #macro quadrado(n) union{ #declare i = 0; #while(i #if(mod(i,3) = 0) texture{tx_fosca2} #else texture{tx_plastico} #end} #declare j = j+1; #end #declare i = i+1; #end } #end #macro redondos(n) union{ #declare i =0; #while(i} #declare j = j+1; #end #declare i = i+1; #end } #end #declare alavanca = union{ object{placa2} object{pino1 rotate<0,20,0> translate <0,0.1,0.2>} object{pino2 rotate<0,20,0> translate <0,0.1,0.2>} } #macro alavancas(n) union{ #declare i=0; #while(i<2) object{alavanca translate<0.25,n*(0.8)-(i+1)*(0.3),n/10>} #declare i = i+1; #end } #end #macro painel(n) box{ <0,0,0>, <0.2,n*0.8,n*0.4> texture{ tx_fosca } } #end #macro tudo(n) union{ object{painel(n)} object{botonsOnOff(n)} object{quadrado(n)} object{redondos(n)} object{alavancas(n)} } #end union{ //object{ eixos(3.00) } object{ chao translate < 1,1,-4 > texture{ tx_xadrez } } object{tudo(7)} } #include "camlight.inc" #declare centro_cena = < 0.00, 2.70, 1.20 >; #declare raio_cena = 4.2; #declare dir_camera = < 14.00, 7.00, 7.00 >; #declare dist_camera = 20.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)