// background{ color rgb < 0.90, 0.60, 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 tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #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 } // DESCRI��O DA CENA #declare raio = 0.50; // Partes da cena: #declare quadrado = box{ < 0.00, 0.00, 0.00 >, < 1.00, 1.00, 1.00 > texture{ tx_plastico } } #declare bola = sphere{ < 0, 0, 0 >, raio texture{ tx_plastico } } #declare hiperpeao = union{ object { quadrado translate < 0, 0, 0 > texture{ tx_plastico } } object{ quadrado translate < 0.5, 0.5, 2 > scale < 0.5, 0.5, 0.5 > texture{ tx_plastico } } object{ quadrado translate < 1.5, 1.5, 6 > scale < 0.25, 0.25, 0.25 > texture{ tx_plastico } } } #declare hiperdama = union{ object { quadrado translate < 0, 0, 0 > texture{ tx_plastico } } object{ quadrado translate < 0.5, 0.5, 2 > scale < 0.5, 0.5, 0.5 > texture{ tx_plastico } } object{ bola translate < 2, 2, 6.5 > scale < 0.25, 0.25, 0.25 > texture{ tx_plastico } } } #macro peca_tabuleiro (indice_fileira, angulo) #local raio_fileira = 0.50+indice_fileira; #local quadrado_tabuleiro = box{ < 0.00, 0.00, 0.00 >, < 2.00, 2.00, 1.00 > texture{ tx_plastico } } #local circulo_tabuleiro = cylinder{ < 0, 0, 0 >, < 0, 0, 0.1 >, 2*raio texture{ tx_xadrez } } intersection { difference { object { circulo_tabuleiro translate < 0, 0, 0.1 > texture{ tx_xadrez } } object { circulo_tabuleiro translate < 0, 0, 0 > scale < 0.5, 0.5, 3 > texture{ tx_xadrez } } } object { quadrado_tabuleiro translate < 0, 0, 0 > texture{ tx_xadrez } } object { quadrado_tabuleiro translate < 0, 0, 0 > rotate angulo*z texture{ tx_xadrez } } } #local angulo_total = 360; // while (angulo_total > 0) // #end #end #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #include "eixos.inc" // Aqui est� a cena, finalmente: union{ object { eixos(4) } object{ chao translate < 0,0,-5 > texture{ tx_fosca } } object{ peca_tabuleiro (1, 15) } object{ peca_tabuleiro (3, 15) } object{ hiperpeao translate < 4, 4, 0> } object{ hiperdama translate < 4, -4, 0> } } #include "camlight.inc" #declare centro_cena = < 2.00, 0.00, 0.00 >; #declare raio_cena = 6.5; #declare dir_camera = < 7.00, 14.00, 10.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)