Intersection points of multiple straight line segments
This feels as though it should be easy, but other than creating loops which for large data sets run for ever I can’t see how to do this
I have mulitple line segments with end points in the form [x11 y11 x12 y12; x21 y21 x22 y22;…] [x13 y13 x14 y14; x23 y23 x24 y24;…]
I am trying to find intersection points between any pair of line segments in the two lists
I know how to find where any specific two intersect, using xy = [x1*y2-x2*y1,x3*y4-x4*y3]/[y2-y1,y4-y3;-(x2-x1),-(x4-x3)]; and looping through each list in turn
but can’t see an efficient way of testing all possible pairs
Any help gratefully receivedThis feels as though it should be easy, but other than creating loops which for large data sets run for ever I can’t see how to do this
I have mulitple line segments with end points in the form [x11 y11 x12 y12; x21 y21 x22 y22;…] [x13 y13 x14 y14; x23 y23 x24 y24;…]
I am trying to find intersection points between any pair of line segments in the two lists
I know how to find where any specific two intersect, using xy = [x1*y2-x2*y1,x3*y4-x4*y3]/[y2-y1,y4-y3;-(x2-x1),-(x4-x3)]; and looping through each list in turn
but can’t see an efficient way of testing all possible pairs
Any help gratefully received This feels as though it should be easy, but other than creating loops which for large data sets run for ever I can’t see how to do this
I have mulitple line segments with end points in the form [x11 y11 x12 y12; x21 y21 x22 y22;…] [x13 y13 x14 y14; x23 y23 x24 y24;…]
I am trying to find intersection points between any pair of line segments in the two lists
I know how to find where any specific two intersect, using xy = [x1*y2-x2*y1,x3*y4-x4*y3]/[y2-y1,y4-y3;-(x2-x1),-(x4-x3)]; and looping through each list in turn
but can’t see an efficient way of testing all possible pairs
Any help gratefully received intersects MATLAB Answers — New Questions