This function finds the coordinates where a vertical or horizontal line intersects the hull.
borderCoords(df, axis, axisIntersect)A vector of size two representing the coordinates of the two intersection points between the vertical or horizontal line and the convex hull on the axis different from the input axis.
A four-column data frame representing segments.
An integer representing the axis intersected by the vertical or horizontal line, x (1) or y (2).
The coordinate where the vertical or horizontal line intersects the relevant axis.