// Last edited on 2013-11-04 19:53:13 by stolfilocal // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_joint = texture{ pigment{ color rgb < 1, 0.5, 0 > } finish{ diffuse 0.8 ambient 0.2 specular 0.5 roughness 0.005 } } #declare tx_red = texture{ pigment{ color rgb < 1, 0, 0 > } finish{ diffuse 0.8 ambient 0.2 specular 0.5 roughness 0.005 } } #declare tx_green = texture{ pigment{ color rgb < 0, 1, 0 > } finish{ diffuse 0.8 ambient 0.2 specular 0.5 roughness 0.005 } } #declare tx_blue = texture{ pigment{ color rgb < 0, 0, 1 > } finish{ diffuse 0.8 ambient 0.2 specular 0.5 roughness 0.005 } } #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 < 1.0, 1.0, 1.0 >, color rgb < 0.0, 0.0, 0.0 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.5 } #declare raio_maior = 0.8; #declare raio_menor = 0.15; #declare cbutton = disc{ <0.25, 0, 0.25>, <0, 1, 0>, 0.25 } #declare tbutton = triangle{ <0, 0, 0>, <0.25, 0, 0.5> <0.5, 0, 0> } #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #macro create_objects(i, j, k, line, col) object{ #if (mod(line,2) = 0) // par = circulo cbutton #else // impar = triangulo tbutton #end translate <0.6*col, 0, 0.6*line> #switch(col) // switch para cor #case (0) #switch(i) #case(0) texture{tx_red} #break #case(1) texture{tx_green} #break #case(2) texture{tx_blue} #break #else texture{tx_joint} #end #break #case (1) #switch(j) #case(0) texture{tx_red} #break #case(1) texture{tx_green} #break #case(2) texture{tx_blue} #break #else texture{tx_joint} #end #break #case (2) #switch(k) #case(0) texture{tx_red} #break #case(1) texture{tx_green} #break #case(2) texture{tx_blue} #break #else texture{tx_joint} #end #break #else texture{tx_joint} #end } #end #macro create_panel(line) #declare painel = box{ <0, -1.5, 0>, <1.5, 0, (0.6*line)> } object{painel texture{tx_vidro}} #end #include "eixos.inc" union{ object{ chao translate < 0,0,-5 > texture{ tx_xadrez } } #declare line = 0; #declare col = 0; #declare k = 0; #while (k < 3) #declare j = 0; #while (j < 3) #declare i = 0; #while (i < 3) #declare col = 0; #while (col < 3) // create line of objects create_objects(i, j, k, line, col) #declare col = col + 1; #end #declare line = line + 1; #declare i = i + 1; #end #declare j = j + 1; #end #declare k = k + 1; #end create_panel(line) //object{ eixos(3.00) } } #include "camlight.inc" #declare centro_cena = < 1.00, 0.00, 8.5 >; #declare raio_cena = 14.0; #declare dir_camera = < 4, 7, 4 >; #declare dist_camera = 80; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)