// CORES E TEXTURAS // background{ color rgb < 0.75, 0.80, 0.85 > } background{ color rgb < 0.90, 0.20, 0.85 > } #declare tx_tabuleiro = texture{ pigment{ color rgb < 0.7, 0.50, 0.40 > } //finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_pecas = 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 } finish{ diffuse 0.2 reflection 1.0*< 1.00, 1.00, 1.00 > 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 } #include "eixos.inc" #declare raio_tabuleiro = 50.0; #declare tabuleiro = cylinder{ < +0.00, +0.00, -2.00 >, < +0.00, +0.00, +0.00 >, raio_tabuleiro texture{ tx_tabuleiro } } #declare peao = union{ cylinder{ < +0.00, +0.00, +0.00 >, < +0.00, +0.00, +1.00 >, 2.00 texture{ tx_pecas } } cone{ < +0.00, +0.00, +1.00 >, 2.00 < +0.00, +0.00, +4.00 >, 1.00 texture{ tx_pecas } } cylinder{ < +0.00, +0.00, +4.00 >, < +0.00, +0.00, +5.00 >, 1.00 texture{ tx_pecas } } sphere{ < 0.00, 0.00, +6.00 >, 1.00 texture{ tx_pecas } } } #declare rainha = union{ cylinder{ < +0.00, +0.00, +0.00 >, < +0.00, +0.00, +1.50 >, 3.00 texture{ tx_pecas } } cone{ < +0.00, +0.00, +1.50 >, 3.00 < +0.00, +0.00, +6.00 >, 1.50 texture{ tx_pecas } } cylinder{ < +0.00, +0.00, +6.00 >, < +0.00, +0.00, +7.50 >, 1.50 texture{ tx_pecas } } cone{ < +0.00, +0.00, +7.50 >, 1.50 < +0.00, +0.00, +9.00 >, 2.00 texture{ tx_pecas } } sphere{ < 0.00, 0.00, +10.50 >, 1.50 texture{ tx_pecas } } } object{ tabuleiro } // #local pos_x = 0.0; // #local pos_y = 0.0; #macro desenhar_circulo(raio) #local theta = radians(360.0) / n; #local i = 0; #while (i < n) #local pos_x = raio * cos(i * theta); #local pos_y = raio * sin(i * theta); #if (mod(i, 4) = 0) object { rainha translate < pos_x, pos_y, 0 > } #else object { peao translate < pos_x, pos_y, 0 > } #end #local i = i + 1; #end #end #macro desenhar_tudo(m, n) desenhar_circulo(raio_tabuleiro - 5.0) desenhar_circulo((raio_tabuleiro - 5.0) * (m - 1) / m) #end #local nfileiras = 9; #local ncasas = 27; desenhar_tudo(nfileiras, ncasas) // object{ eixos(raio_tabuleiro * 1.25) } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 20.00 >; #declare raio_cena = raio_tabuleiro * 1.5; #declare dir_camera = < 14.00, 7.00, 4.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)