In my code I have a list of lines as show below
where
X1, Y1: Coordinates of starting point
X2, Y2: Coordinate