Create a vector to store starting and ending points
for i in range ( n ) : NEW_LINE INDENT points [ i * 2 ] = ( segments [ i ] [ 0 ] , False ) NEW_LINE points [ i * 2 + 1 ] = ( segments [ i ] [ 1 ] , True ) NEW_LINE DEDENT