/* Helene Martin, Garfield AP CS 
	Draws a rescalable ASCII mirror!
	
	Desired output:
#================#
|      <><>      |
|    <>....<>    |
|  <>........<>  |
|<>............<>|
|<>............<>|
|  <>........<>  |
|    <>....<>    |
|      <><>      |
#================#

Pseudocode:
draw # 16 = #
for each of 4 lines
	draw | draw some spaces, <> some dots <>, some spaces draw |
for each of 4 lines
	again but backwards
draw # 16 = #
*/

public class Mirror {
	// Change class constant to resize entire figure
	public static final int SIZE = 3;
	
	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 <= 4 * SIZE; i++) {
			System.out.print("=");
		}
		System.out.println("#");
	}
	
	// Draws the top of the mirror
	public static void drawTop() {
		for(int i = 1; i <= SIZE; i++) {
			System.out.print("|");
			for(int j = 1; j <= i * -2 + SIZE * 2; 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 + SIZE * 2; j++) {
				System.out.print(" ");
			}
			System.out.println("|");
		}
	}
	
	// Draws the bottom of the mirror
	public static void drawBottom() {
		for(int i = SIZE; i >= 1; i--) {
			System.out.print("|");
			for(int j = 1; j <= i * -2 + SIZE * 2; 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 + SIZE * 2; j++) {
				System.out.print(" ");
			}
			System.out.println("|");
		}
	
	}
}
