Suppose we have a sheet of paper partitioned in a grid of squares. We label squares with coordinates (i,j). Square (0,0) is the leftmost top square. Square (i,j) is the square in row i+1 and column j+1. For example, square (1,2) is the second square from the top row, in the third column.

On this sheet we want to draw a letter E of 10 squares high and 5 squares wide. The sheet contains at least 5 rows and 10 columns of squares.

There are three primitive drawing instructions:

  1. pen down: put the pen down;
  2. pen up: put the pen up; and
  3. goto (i,j): go to square (i,j).
If the pen is down, then goto will draw a line from the current square to square (i,j).
  1. Make a drawing to illustrate the movements of the pen. Instead of lines use vectors and label the vectors with 1, 2, ... to mark the order of movements.
  2. Write all instructions for the algorithm to draw a E of 10 squares high and 5 squares wide, using only the three primitive drawing operations.