// Last edited on 2017-05-04 05:09:06 by stolfilocal // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.40, 0.70, 1.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_chapeu = texture{ pigment{ color rgb 1.2*< 0.10, 0.87, 0.40 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.0, 0.0, 0.0 >, color rgb < 1.00, 1.00, 1.00 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } #declare raio = 2.000; #macro soldado(tipo) #declare headRadius = 0.3; #declare footHeight = 0.05; #declare footWidth = 0.14; union { box{ <-0.02, 0.1-footWidth/2, 0>, <0.3, 0.1+footWidth/2, footHeight> } box{ <-0.02, -0.1-footWidth/2, 0>, <0.3, -0.1+footWidth/2, footHeight> } cone{ <0, 0.1, 0>, 0.06, <-0, 0.1, 1>, 0.3 } cone{ <0, -0.1, 0>, 0.06, <0, -0.1, 1>, 0.3 } cone{ <0, 0, 1>, 0.4, <0, 0, 2>, 0.2 } cone{ <0, 0, 2>, 0.07, <0, 0, 2.2>, 0.05 } sphere{ <0, 0, 2.2+headRadius>, headRadius } #if (tipo = 1) cone{ <0, 0, 2.2+headRadius*2-0.1>, 0.25, <0, 0, 2.2+headRadius*2+0.15>, 0.2 texture{ tx_chapeu } } #end cylinder{ <0, 0, 1.8>, <0, 1, 1.8>, 0.1 } cylinder{ <0, 0, 1.8>, <0, -1, 1.8>, 0.1 } sphere{ <0, 1, 1.8>, 0.18 } sphere{ <0, -1, 1.8>, 0.18 } } #end #macro pelotao(columns, rows) #declare i = 0; union { #while(i < rows) #declare j = 0; #while(j < columns) #if ((i = 0 | i = rows-1) & (j = 0 | j = columns-1) | (i = int(rows/2) & j = int(columns/2))) object{ soldado(1) translate } #else object{ soldado(0) translate } #end #declare j = j + 1; #end #declare i = i + 1; #end } #end #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #include "eixos.inc" union{ // object{ eixos(3.00) } object{ chao translate < 0,0,-1 > texture{ tx_xadrez } } object{ pelotao(5, 7) texture{ tx_plastico } } } #include "camlight.inc" #declare centro_cena = < 2.00, 3.20, 0.20 >; #declare raio_cena = 10.0; #declare dir_camera = < 14.00, 7.00, 8.00 >; #declare dist_camera = 206.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)