background{ color rgb <0.53, 0.81, 0.92> } #declare tx_branco = texture { pigment { color rgb <1, 1, 0.87> } finish { diffuse 0.9 ambient 0.1 } } #declare tx_preto = texture { pigment { color rgb 5*<0.11, 0.1, 0.08> } finish{ diffuse 0.9 ambient 0.1 } } #declare hiperpeao = union { sphere { <0, 0, 2>, 0.5 } cylinder { <0, 0, 2>, <0, 0, 3>, 0.5 } cone { <0, 0, 0> 1, <0, 0, 2> 0 } } #declare hiperdama = union { cylinder { <0, 0, 0>, <0, 0, 1.5> 0.5 } cone { <0, 0, 1.5> 0.5, <0, 0, 2.5> 1 } cone { <0, 0, 2.5> 1, <0, 0, 3.5> 0 } sphere { <0, 0, 3.75>, 0.5 } } #macro tabuleiro (m, n) #local i = 0; #local raio = m*2; #local tab = difference { cylinder { <0, 0, 0>, <0, 0, 0.25> raio } sphere { <0, 0, 0> raio/4 } } #local caixas_cortes = union { box { <0, 0, 0>, rotate <0, 0, -15> } box { <0, 0, 0>, rotate <0, 0, 15> } } union { object { tab texture { tx_branco } } } #end #declare nfileiras = 8; #declare ncasas = 12; union { object { hiperpeao texture { tx_preto } translate <0, 1.5, 0> } object { hiperdama texture { tx_branco } translate <0, -1.5, 0> } object { tabuleiro(nfileiras, ncasas) } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 2.5*nfileiras; #declare dir_camera = < 14.00, 7.00, 9.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)