Check for every two points in the same vertical line
for line in vertical : NEW_LINE INDENT X1 = line ; NEW_LINE yList = vertical [ line ] ; NEW_LINE for i in range ( len ( yList ) ) : NEW_LINE INDENT Y1 = yList [ i ] ; NEW_LINE for j in range ( i + 1 , len ( yList ) ) : NEW_LINE INDENT Y2 = yList [ j ] ; NEW_LINE side = abs ( Y1 - Y2 ) ; NEW_LINE X2 = X1 + side ; NEW_LINE DEDENT DEDENT DEDENT