// Last edited on 2013-11-04 20:20:44 by stolfilocal // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare Red = texture{ pigment{ color rgb < 0.8, 0.1, 0.1 > } } #declare Blue = texture{ pigment{ color rgb < 0.1, 0.1, 0.8 > } } #declare Green = texture{ pigment{ color rgb < 0.1, 0.8, 0.1 > } } #declare Yellow = texture{ pigment{ color rgb < 0.1, 0.6, 0.6 > } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } 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.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 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 } #macro painel(hor, ver, prof) box{<-hor/2, -ver/2, -prof/2>, texture{ tx_xadrez }} bolas(ver/20, hor/5, 5, -2*hor/5, ver/3, prof/2) lampadas(hor/20, ver/8, 5, hor/4, -2*ver/5, prof/2) circ(hor/20, ver/8, 5, 0, -2*ver/5, prof/2) alavanca(hor/20, ver/8, 5, -hor/4, -2*ver/5, prof/2) switchson(hor/20, ver/8, 5, -2*hor/5, -2*ver/5, prof/2) switchson(hor/20, ver/8, 5, 2*hor/5, -2*ver/5, prof/2) #end #macro bolas(tam, nbolas, dist, tx, ty, tz) union{ #declare n = 0; #while (n, <0, 0, 1*tam>, 1 translate texture{ tx_fosca}} #else cylinder{<0, 0, 0>, <0, 0, 2*tam>, 1 translate texture{ tx_fosca}} #end box{<-1*tam, -1*tam, -0.5*tam>, <1*tam, 1*tam, 0.5*tam> translate texture{ tx_plastico }} #declare n=n+1; #end } #end #macro lampadas(tam, nlamp, dist, tx, ty, tz) union{ #declare n = 0; #while (n, <0, 0, 1*tam>, 1, 1 translate texture{ tx_fosca}} sphere{<0, 0, 1.5*tam>, tam, 1 translate texture{ tx_fosca}} } #else blob{ threshold 0.6 cylinder{<0, 0, 0>, <0, 0, 1*tam>, 1, 1 translate texture{ Yellow}} sphere{<0, 0, 1.5*tam>, tam, 1 translate texture{Yellow}} } #end #declare n=n+1; #end } #end #macro circ(tam, ncirc, dist, tx, ty, tz) union{ #declare n = 0; #while (n, tam translate texture{ Blue}} #else sphere{<0, 0, 0>, tam translate texture{Red}} #end #declare n=n+1; #end } #end #macro alavanca(tam, ncirc, dist, tx, ty, tz) union{ #declare n = 0; #while (n, <0, 0, tam>, tam/10 rotate<30, 0, 0> translate texture{ tx_fosca}} sphere{<0, 0, tam>, tam/4 rotate<30, 0, 0> translate texture{ Green}} #else cylinder{<0, 0, 0>, <0, 0, tam>, tam/10 rotate<-30, 0, 0> translate texture{ tx_fosca}} sphere{<0, 0, tam>, tam/4 rotate<-30, 0, 0> translate texture{Yellow}} #end #declare n=n+1; #end } #end #macro switchson(tam, nswitch, dist, tx, ty, tz) union{ #declare n = 0; #while (n, translate texture{Red}} box{, <2*tam/3, tam/3, tam/3> translate texture{Blue}} } #else difference{ box{<0, 0, 0>, rotate<180, 0, 0> translate texture{Red}} box{, <2*tam/3, tam/3, tam/3> rotate<180, 0, 0> translate texture{Blue}} } #end #declare n=n+1; #end } #end #declare pai=painel(30, 40, 5) #include "eixos.inc" union{ //eixos(20) object{ pai texture{ tx_fosca }} } #include "camlight.inc" #declare centro_cena = < 0, 0, 0.00 >; #declare raio_cena = 37.0; #declare dir_camera = < 10.00, -15.00, 15.00 >; #declare dist_camera = 120.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)