Abstract:For a given set S of line segments, finding a straight line intersecting with all the line segments in S is studied in this paper. If an intersection restriction is satisfied by the set, the algorithm presented is to answer whether there is a straight line intersecting with all the line segments in S. If the straight lines exist, the algorithm finds a maximum range, where every straight line located in the range intersects with all the line segments in S. The time complexity of the algorithm is O(n×log n). The algorithm can be used in pattern marching and so on.