background{ color rgb < 0.75, 0.80, 0.85 > }

#include "eixos.inc"

#declare tx_plastico = 
  texture{
    pigment{ color rgb < 0.1, 1, 1 > }
    finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 }
  }

#declare tx_xadrez =
  texture{
    pigment{ checker color rgb < 1, 1, 1 >, color rgb < 0, 0, 0 > }
    finish{ diffuse 0.9 ambient 0.1 }
    scale 2.0
  }

#macro tanque1(xx,yy)
    #declare t1 =
        union{
            cone {
                <0, 0, 0>, 1.0 // <x, y, z>, center & radius of one end
                <0, 0, 1.25>, 0.5 // <x, y, z>, center & radius of the other end
                texture{tx_plastico}
            }
            cylinder {
                <0, 0, 0>, <0, 0, 2.25>, 0.5 // center of one end, center of other end, radius
                texture{tx_plastico}
            }

            cone {
                <0, 0, 2.25>, 0.5 // <x, y, z>, center & radius of one end
                <0, 0, 3.5>, 1.0 // <x, y, z>, center & radius of the other end
                texture{tx_plastico}
            }
            
            cylinder {
                <0, 0, 3.5>, <0, 0, 4>, 0.25 // center of one end, center of other end, radius
                texture{tx_plastico}
            }

            cylinder {
                <0, 0, 1.75>, <0, 1.25, 1.75>, 0.25 // center of one end, center of other end, radius
                texture {tx_plastico}
            
            }

            cylinder {
                <0, 0, 0>, <1.25, 1.25, 1>, 0.25 // center of one end, center of other end, radius
                texture{tx_plastico}
            }
        }
    union{object{t1 translate<xx, yy, 0>}}
#end

#macro tanque2(xx,yy)
    #declare t2 = 
        union{
            cylinder {
                <0, 0, 0>, <0, 0, 1.5>, 0.75 // center of one end, center of other end, radius
                texture{tx_plastico}
            }

            cone {
                <0, 0, 1.5>, 1.0 // <x, y, z>, center & radius of one end
                <0, 0, 2.5>, 0.5 // <x, y, z>, center & radius of the other end
                texture{tx_plastico}
            }

            sphere {
                <0, 0, 3>, 0.75 // <x, y, z>, radius
                texture {tx_plastico}
            }
            
            cylinder {
                <0, 0, 3.25>, <0, 0, 4>, 0.25// center of one end, center of other end, radius
                texture{tx_plastico}
                
            }

            cylinder {
                <0, 0, 0.5>, <1.25, 1.25, 1>, 0.25 // center of one end, center of other end, radius
                texture{tx_plastico}
            }
            
            cylinder {
                <0, 0, 0.5>, <-1.25, 1.25, 1>, 0.25 // center of one end, center of other end, radius
                texture{tx_plastico}
            }
        }
    union{object{t2 translate<xx, yy, 0>}}
#end

union{
  // object{eixos(3.00)}
  tanque1(0,0)
  tanque2(0,3)
}

#include "camlight.inc"
#declare centro_cena = < 0.00, 1.5, 1.70 >;
#declare raio_cena = 4.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)