// Last edited on DATE TIME by USER
// Processed by remove-cam-lights

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

#declare tx_fosca_laranja =
  texture{
    pigment{ color rgb < 1.00, 0.270, 0 > }
    finish{ diffuse 0.9 ambient 0.1 }
  }

#declare tx_fosca_cinza =
  texture{
    pigment{ color rgb < 0.184, 0.309, 0.309 > }
    finish{ diffuse 0.9 ambient 0.1 }
  }

#declare tx_fosca_azul =
  texture{
    pigment{ color rgb < 0, 0, 1 > }
    finish{ diffuse 0.9 ambient 0.1 }
  }

#declare tx_fosca_azul_claro =
  texture{
    pigment{ color rgb < 0.392, 0.584, 0.929 > }
    finish{ diffuse 0.9 ambient 0.1 }
  }

#declare tx_fosca_verde =
  texture{
    pigment{ color rgb < 0.196, 0.803, 0.196 > }
    finish{ diffuse 0.9 ambient 0.1 }
  }

#declare tx_fosca_vermelho =
  texture{
    pigment{ color rgb < 1, 0, 0 > }
    finish{ diffuse 0.9 ambient 0.1 }
  }

#declare tx_xadrez =
  texture{
    pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > }
    finish{ diffuse 0.9 ambient 0.1 }
    scale 2.0
  }

#declare raio = 2.000;

#declare muralha =
  union{
    difference{
      difference{
        cylinder{ < 0, 0, -0.5>, < 0, 0, 2>, 4.5 }
        cylinder{ < 0, 0, -0.6>, < 0, 0, 2.1>, 4.3 }
      }
        cylinder{ < 0, 0, -0.2>, < 6, 3, -0.2>, 1 }
    }
  }

#declare torre =
  union{
    cylinder{ < 0, 0, -0.5>, < 0, 1.1, -0.5>, 0.1 } //Cilindro Horizontal
    cylinder{ < 0, 1, -0.5>, < 0, 1, 1>, 0.1 }      //Cilindro Vertical
    cone{ <0, 1, 1>, 0.4 <0, 1, 1.5>, 0 }         //Teto da Torre
  }

#declare roleta = seed(0);

#macro castelo (p)
  #if (p >= 1)
    #local p1 = p - 1;
    #local p2 = p - 1;
    union{
      object{torre texture{tx_fosca_laranja}}
      object{ castelo(p1) translate <0, 1, 0.75>}
      object{ castelo(p2) rotate < 0,0,180 > translate <0, 1, 0.75>}
    }
  #else
    object{torre texture{tx_fosca_laranja}}
  #end
#end

#declare chao =
  box{ <-20,-20,-1>, <+20,+20,0> }

#include "eixos.inc"

union{

  object{ muralha texture{tx_fosca_cinza} }
  object{ castelo(3) translate <0.5,-0.5,0> }

  object{ chao  translate < 0,0,-0.5 > texture{ tx_xadrez } }

}

#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 = 16.0;
#declare intens_luz = 1.00;
camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)