background {color rgb < 0.75, 0.80, 0.85 >} #declare tx_plastico = texture { pigment{ color rgb < 0.90, 0.90, 0.90 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_bug = texture { pigment{ color rgb < 1.00, 0.70, 0.10 > } finish{ diffuse 0.2 ambient 0.8 } } #declare cabeca_peao_dama = sphere { <0, 0, 0>, 0.15 // , radius texture {tx_plastico} } #declare corpo_peao = cylinder { <0, 0, -0.4>, <0, 0, -0.15>, 0.3 // center of one end, center of other end, radius texture {tx_plastico} } #declare pe_peao = cone { <-0.3, 0, -0.4>, 0 // , center & radius of one end <-0.3, 0, -0.7>, 0.1 // , center & radius of the other end texture {tx_plastico} } #declare corpo_dama = cone { <0, 0, -0.15>, 0 // , center & radius of one end <0, 0, -0.4>, 0.3 // , center & radius of the other end texture {tx_plastico} } #declare pe_dama = cylinder { <-0.3, 0, -0.4>, <-0.3, 0, -0.7>, 0.1 // center of one end, center of other end, radius open // remove end caps texture {tx_plastico} } #declare hiperpeao = union { object {cabeca_peao_dama} object {corpo_peao} object {pe_peao} object {pe_peao translate <0.6, 0, 0>} // } #declare hiperdama = union { object {cabeca_peao_dama} object {corpo_dama} object {pe_dama} object {pe_dama translate <0.6, 0, 0>} } #declare borda_casa = box { <-2, -2, 0>, <2, 0, 0> // near lower left corner, far upper right corner texture{ tx_bug } } #declare tabuleiro = intersection { box { <-4, -4, 0>, <4, 4, 0> // near lower left corner, far upper right corner } sphere { <0, 0, 0>, 2 // , radius } texture {tx_plastico} } #include "eixos.inc" #declare m = 3; #declare n = 4; union { intersection { intersection { object {tabuleiro} object {borda_casa} } object {borda_casa rotate <0, 0, 90> // } } } union{ object{ eixos(0.7) } object{ hiperdama } translate 3*<1.0, +0.3, 0.0> } union{ object{ eixos(0.7) } object{ hiperpeao } translate 3*<1.0, -0.3, 0.0> } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 6.0; #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)