// Last edited on 2000-11-09 12:14:05 by Felipe de Alvarenga Leite
#include "colors.inc"
#include "stones.inc"

plane{ y, 0
	pigment{granite scale 1.5}
}
/*
sky_sphere {
    pigment {
      gradient y
      color_map {
        [0.000 0.002 color rgb <1.0, 0.2, 0.0>
                     color rgb <1.0, 0.2, 0.0>]
        [0.002 0.200 color rgb <0.8, 0.1, 0.0>
                     color rgb <0.2, 0.2, 0.3>]
      }
      scale 2
      translate -1
    }
    pigment {
      bozo
      turbulence 0.65
      octaves 6
      omega 0.7
      lambda 2
      color_map {
          [0.0 0.1 color rgb <0.85, 0.85, 0.85>
                   color rgb <0.75, 0.75, 0.75>]
          [0.1 0.5 color rgb <0.75, 0.75, 0.75>
                   color rgbt <1, 1, 1, 1>]
          [0.5 1.0 color rgbt <1, 1, 1, 1>
                   color rgbt <1, 1, 1, 1>]
      }
      scale <0.2, 0.5, 0.2>
    }
    rotate -135*x
  }
*/

background{ color rgb < 1, 1, 1 > }   


light_source {
  < 10.00, 15.00, -25.00 >
  color rgb < 1.00, 1.00, 1.00 >
} 

light_source {
  < -10.00, 35.00, 25.00 >
  color rgb < 1.00, 1.00, 1.00 >
} 

camera {
  location  <  -5.00, 22.00, -25.00 > 
//  right     < 0.000, 0.00, 0.00 >
//  up        <  0.00, 0.00, 0.00 >
  sky       <  0.00, 1.00, 0.00 >
  look_at   <  15, 5, 15 >
} 
 
#declare azul=
	color rgb <0.8, 1, 1>;

#declare telhado=
	color rgb<1, 0, 0>;

#declare base=
   union{
 	object{box{<0, 0, 0> <20, 4, 40> pigment{azul}}}
   	object{box{<0, 4, -1> <20, 6, 3> pigment{azul}}}
   	object{box{<0, 6, -1> <20, 8, 3> pigment {azul}}}
   	object{box{<8, 4, 20> <12, 8, 40> pigment {azul}}}
   	object{box{<4, 6, 0> <16, 8, 3> pigment {azul}}}
	object{box{<6, 8, 0> <14, 12, 3> pigment{azul}}}
	}  
	
#declare degraus=
   union{ 
	object{box{<5, 0, 0> <15, 0.1, -2> pigment {Brown}}}
	object{box{<5.2, 0.1, 0> <14.8, 0.2, -1.9> pigment {Brown}}}
	object{box{<5.4, 0.2, 0> <14.6, 0.3, -1.8> pigment {Brown}}}
	object{box{<5.6, 0.3, 0> <14.4, 0.4, -1.7> pigment {Brown}}}
	object{box{<5.8, 0.4, 0> <14.2, 0.5, -1.6> pigment {Brown}}}
	object{box{<6, 0.5, 0> <14, 0.6, -1.5> pigment {Brown}}}
        }

#declare torre1=
   union{ 
	difference{
		object{box{<8, 12, 0> <12, 16, 3> pigment {azul}}}
		object{box{<8.5, 12.1, -0.1> <11.5, 15.5, 3.1>}}
		object{box{<7.9, 12.1, 0.5> <12.1, 15.5, 2.5>}}
		}
	object{box{<8.5, 16, 0> <11.5, 16.5, 3> pigment {azul}}}
	object{prism {
		conic_sweep
		linear_spline
		0, // height 1
		1, // height 2
		5, // the number of points making up the shape...
		<1,1>,<-1,1>,<-1,-1>,<1,-1>,<1,1>
		rotate <180, 0, 0>
		scale<2.15, 4, 1.7>
		translate<10, 20.5, 1.5>
    		pigment {Black}
		}
	}
	object{cylinder{<10, 20, 1.5> <10, 20.7, 1.5> 0.3 pigment {Black}}}
	object{sphere{<10, 21.1, 1.5> 0.5 pigment {Black}}}
	object{box{<10.05, 21.5, 1.55> <9.95, 23.1, 1.45> pigment {Black}}}
	object{box{<9.4, 22.65, 1.45> <10.6, 22.75, 1.55> pigment {Black}}}
}


#declare abobada=
   union{
	object{sphere{ <10, 10, 22> 2 pigment {Black}}}
	object{cylinder{ <10, 8, 22> <10, 10, 22> 2 pigment {azul}}}
}

#declare relogio=
   cylinder{<10, 10, 0> <10, 10, -0.05> 1 pigment {White}}
                   
#declare colunag=
   union{
        cylinder{<0.5, 0, -0.5> <0.5, 4, -0.5> 0.5 pigment {White}}
        cylinder{<0.5, 0, -0.5> <0.5, 1, -0.5> 0.55 pigment {White}}
        cylinder{<0.5, 1.05, -0.5> <0.5, 1.1, -0.5> 0.55 pigment {White}}
        cylinder{<0.5, 1.15, -0.5> <0.5, 1.2, -0.5> 0.55 pigment {White}}
        cylinder{<0.5, 3.8, -0.5> <0.5, 4, -0.5> 0.55 pigment {White}} 
}


#declare colunap=
   union{
        cylinder{<0.5, 0.6, -0.5> <0.5, 4, -0.5> 0.35 pigment {White}}
        cylinder{<0.5, 0.6, -0.5> <0.5, 1, -0.5> 0.4 pigment {White}}
        cylinder{<0.5, 1.05, -0.5> <0.5, 1.1, -0.5> 0.4 pigment {White}}
        cylinder{<0.5, 1.15, -0.5> <0.5, 1.2, -0.5> 0.4 pigment {White}}
        cylinder{<0.5, 3.8, -0.5> <0.5, 4, -0.5> 0.4 pigment {White}} 
}

#declare colunasfachada=
   union{
        object{colunag}
        object{colunag translate 5*x}
        object{colunag translate 14*x}
        object{colunag translate 19*x}
        object{colunap translate <7, 0, -0.6>}
        object{colunap translate <8.5, 0, -0.6>}
        object{colunap translate <10.7, 0, -0.6>}
        object{colunap translate <12.2, 0, -0.6>}
        }                            

#declare prisma3=
    prism {
        linear_sweep
        linear_spline
        0, // sweep the following shape from here ...
        1, // ... up through here
        4, // the number of points making up the shape ...
        <-5,-1.5>, <5,-1.5>, <0,1>, <-5, -1.5>
        pigment {azul}
        }
        
#declare toldo=
    union{
        object{box{<5,4,0> <15, 5.5, -2> pigment {azul}}}
        object{prisma3 rotate -90*x translate <10, 7, -1>}
        object{prisma3 rotate -90*x scale<0.85, 0.85, 0.05> translate <10, 7, -2>}
        object{prisma3 rotate -90*x scale<0.3, 0.3, 0.05> translate <10, 6.8, -2.05>}
        object{prisma3 pigment{telhado} rotate -90*x scale <1, 1, 0.95> translate <10, 7.05, -1>}
        object{text { ttf "timrom.ttf" "N. SENHORA DA CONCEICAO" 0.5, 0
                pigment { BrightGold }
                finish { reflection .25 specular 1 }}
                scale <0.63, 0.8, 1>
                translate <5.5, 4.5, -2.04>
              }


}                

#declare telhado1=	
union{
	difference{
		object{prisma3 pigment{telhado} rotate -90*x scale<1.6, 1.6, 20> translate <8, 6.4 , 40>}
		object{box{<8, 3, 10> <12, 13, 50>}}
		}
	difference{
		object{prisma3 pigment{telhado} rotate -90*x scale <1.6, 1.6, 20> translate <12, 6.4, 40>}
		object{box{<8, 3, 10> <12, 13, 50>}}
		}
	object{prisma3 pigment{telhado} rotate -90*x scale <0.7, 1.6, 16> translate <10, 9, 40>}
	object{prisma3 pigment{telhado} rotate -90*x scale <2, 2.6, 17> translate <10, 7.9, 20>}
}
           
#declare telhadof=
difference{
	object{telhado1}
	box{<7.5, 8, 19.5> <12.5, 12, 24.5>}
	}
                                                 
#declare catedral=
union{
object{base}
object{relogio}
object{torre1}
object{abobada}
object{degraus} 
object{colunasfachada}  
object{toldo}
object{telhadof}
}

object{catedral}