top = 1;

bottom = 2;

left = 1;

right = 2;

Will give us the values:

5, 6

8, 9

When you say top or bottom do you mean the column (or row)?

And then left or right is the row (or column)?

Then the element at top=1,left=1 is is on the first row in the first column

This would give ONE of the values (the x or the y?) of the four needed to define two points.

How do you get the other value (the y or the x) needed for the point.

How do you get the indexes for the other point(each point has an x and y value)