Given a list of line segments, the easiest way to find the intersection points is to loop through the line segment list, check whether they are intersecting and record the i
The Bentley-Ottmann Algorithm may be what you are looking for.