// MC930 - Trabalho final
// Fabio Abreu Hashimoto  RA 970640

// Predio do Imecc

#include "colors.inc"

#declare centro = < -2, 0, 0 >;


// CÂMERA

camera {
  location <15, 0, 4>
  sky       z
  look_at   centro
}

// ILUMINAÇÃO 

light_source { < 100, 50, 200 > color White  }

// Blocos Principais

#declare bloco_f1 =
	box {
		<-4,-2,-2>,
		<0,2,2>
		pigment { color Gray }
	}

#declare faixasv_f1 =
union {
	#declare n=0;
	#while (n < 3) // 3 faixas vermelhas
		box {
			<0,-2,-1.5+(n*1)>,
			<0.1,2,-1.0+(n*1)>
			pigment { color  Red }
		}
		#declare n = n+1;
	#end
}

#declare faixasp_f1 =
union {
	#declare n=0;
	#while (n < 3) // 3 faixas brancas
		box {
			<0,-2,-1.0+(n*1)>,
			<0.1,2,-0.5+(n*1)>
			pigment { color rgb <0.98,0.98,0.98> }
		}
		#declare n = n+1;
	#end
}

#declare bloco_f =
  union {
	object { bloco_f1 }
	object { faixasv_f1 }
	object { faixasp_f1 }
  }

#declare bloco_f2 =
	box {
		<-4,-4.4,-2>,
		<0,-2,2.5>
		pigment { color Gray }
	}

#declare faixasv_f2 =
union {
	#declare n=0;
	#while (n < 3) // 3 faixas vermelhas
		box {
			<0,-4.4,-1.2+(n*1)>,
			<0.1,-2,-0.7+(n*1)>
			pigment { color  Red }
		}
		#declare n = n+1;
	#end
}

#declare faixasp_f2 =
union {
	#declare n=0;
	#while (n < 3) // 3 faixas brancas
		box {
			<0,-4.4,-0.7+(n*1)>,
			<0.1,-2,-0.2+(n*1)>
			pigment { color rgb <0.98,0.98,0.98> }
		}
		#declare n = n+1;
	#end
}

#declare bloco_d =
union {
	object { bloco_f2 }
	object { faixasv_f2 }
	object { faixasp_f2 }
}

#declare bloco_e =
	object { bloco_d translate <0,6.4,0> }

#declare bloco_f3 =
	box {
		<-4,-6,-2>,
		<0,-4.4,3>
		pigment { color Gray }
	}

#declare faixasv_f3 =
union {
	#declare n=0;
	#while (n < 4) // 4 faixas vermelhas
		box {
			<0,-6,-1.8+(n*1)>,
			<0.1,-4.4,-1.3+(n*1)>
			pigment { color  Red }
		}
		#declare n = n+1;
	#end
}

#declare faixasp_f3 =
union {
	#declare n=0;
	#while (n < 4) // 4 faixas brancas
		box {
			<0,-6,-1.3+(n*1)>,
			<0.1,-4.4,-.8+(n*1)>
			pigment { color rgb <0.98,0.98,0.98> }
		}
		#declare n = n+1;
	#end
}

#declare bloco_d2 =
union {
	object { bloco_f3 }
	object { faixasv_f3 }
	object { faixasp_f3 }
}

#declare bloco_e2 =
	object { bloco_d2 translate <0,10.4,0> }



object { bloco_f }
object { bloco_d }
object { bloco_e }
object { bloco_d2 }
object { bloco_e2 }