/* Helene Martin, Garfield HS
Draws a scalable mirror

Goal (size 3):

#============#
|    <><>    |
|  <>....<>  |
|<>........<>|
|<>........<>|
|  <>....<>  |
|    <><>    |
#============#

Pseudocode: 
draw # (12x =) #

for each of 3 lines
	draw some spaces, <>, some dots, <>, some spaces
	line		spaces		dots
	1			4				0 
	2			2				4
	3			0				8

for each of 3 lines
	draw some spaces, <>, some dots, <>, some spaces
	line		spaces		dots
	1			0				8 
	2			2				4
	3			4				0

draw # (12x =) #
*/

public class Mirror {
	// height of the two triangles
	public static final int SIZE = 10;

	public static void main(String[] args) {
		drawLine();
		drawTop();
		drawBottom();
		drawLine();
	}
	
	// draws a line
	public static void drawLine() {
		System.out.print("#");
		for(int i = 1; i <= SIZE * 4; i++) {
			System.out.print("=");
		}
		System.out.println("#");
	}

	// draws a triangle of dots and spaces open to the bottom	
	public static void drawTop() {
		for(int i = 1; i <= SIZE; i++) {
			System.out.print("|");
			for(int j = 1; j <= i * -2 + 2 * SIZE; j++) {
				System.out.print(" ");
			}
			System.out.print("<>");
			for(int j = 1; j <= i * 4 - 4; j++) {
				System.out.print(".");
			}
			System.out.print("<>");
			for(int j = 1; j <= i * -2 + 2 * SIZE; j++) {
				System.out.print(" ");
			}
			System.out.println("|");
		}
	}
	
	// draws a triangle of dots and spaces open to the top
	public static void drawBottom() {
		for(int i = SIZE; i >= 1; i--) {
			System.out.print("|");
			for(int j = 1; j <= i * -2 + 2 * SIZE; j++) {
				System.out.print(" ");
			}
			System.out.print("<>");
			for(int j = 1; j <= i * 4 - 4; j++) {
				System.out.print(".");
			}
			System.out.print("<>");
			for(int j = 1; j <= i * -2 + 2 * SIZE; j++) {
				System.out.print(" ");
			}
			System.out.println("|");
		}
	}
}
