#declare tx_plastico = texture{ pigment{ color rgb < 0.90, 0.12, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.9, 0.7, 0.80 >, color rgb < 0.00, 0.07, 0.70 > } finish{ diffuse 0.9 ambient 0.1 } scale 1.5 } #macro tanqu1(_x,_y) #local Cn1 = cone { <_x, _y, 0>, 1.0 // , center & radius of one end <_x, _y, 5>, 0 // , center & radius of the other end } #local S1 = sphere { <_x, _y, 7>, 2 // , radius } #local C1 = cylinder { <_x+1, _y, 7>, <_x+1.5, _y, 7>, 0.3 // center of one end, center of other end, radius } #local C2 = cylinder { <_x+1, _y+1, 7>, <_x+1.5, _y+1.5, 7>, 0.3 // center of one end, center of other end, radius } #local C3 = cylinder { <_x-1, _y+1, 7>, <_x-1.5, _y+1.5, 7>, 0.3 // center of one end, center of other end, radius } union{ object{Cn1} object{S1} object{C1} object{C2} object{C3} } #end #macro gera_tanques(m,n) union{ #for (i,0,m-1) #for (j,0,n-1) object{ tanqu1(i*2,j*2) texture {tx_plastico}} #end #end } #end #include "eixos.inc" #declare chao = object{ eixos(3.00) } box{ <-20,-20,-1>, <+20,+20,0> } union{ object {gera_tanques(3,3)} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 20.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)