About 157,000 results
Open links in new tab
  1. How can I check if two segments intersect? - Stack Overflow

    Oct 1, 2010 · Calculate the intersection point of the lines laying on your segments (it means basically to solve a linear equation system), then check whether is it between the starting and …

  2. How do you detect where two line segments intersect? [closed]

    Feb 19, 2009 · Otherwise, the two line segments are not parallel but do not intersect. Credit: this method is the 2-dimensional specialization of the 3D line intersection algorithm from the article …

  3. How to efficiently check if two line segments intersect?

    Feb 3, 2025 · Checking whether two line segments have a shared coordinate is a trivial check that you do first, before running the standard line/line intersection math. As for "Line segments …

  4. How do I compute the intersection point of two lines?

    Dec 19, 2013 · Many of the other answers don't work for line segments, and of those that do, none of them correctly determine the intersection point (s) for collinear (overlapping) line …

  5. c# - The algorithm to find the point of intersection of two 3D line ...

    Feb 23, 2010 · Finding the point of intersection for two 2D line segments is easy; the formula is straight forward. But finding the point of intersection for two 3D line segments is not, I afraid. …

  6. How do I find the intersection of two line segments?

    Mar 15, 2014 · Suppose we have two finite line segments defined each by two points (in two space). I would like to find a way to get the intersection point of those two lines. Eventually, I …

  7. Calculation of intersections between line segments

    May 1, 2013 · The point of intersection is equivalent to a solution of a system of equations representing the two lines. Really, y = a1*x + b1 and y = a2*x + b2 intersecting basically …

  8. Find the intersection of two parallel (collinear) line segments

    Mar 8, 2025 · If both are perpendicular to the x-axis, they will both have infinite slopes, but they will be parallel. All points on each line will have equal x coordinates. To deal with line …

  9. Test if two lines intersect - JavaScript function

    Jan 28, 2012 · I've tried searching for a javascript function that will detect if two lines intersect each other. The function will take the x,y values of both the start end points for each line (we'll …

  10. c++ - Find out if 2 lines intersect - Stack Overflow

    Jan 6, 2013 · How do you detect where two line segments intersect? Determining if two line segments intersect? Given are two lines l1= ( (A0, B0), (A1, B1)) and l2= ( (A2, B2), (A3, B3)); …