1
$\begingroup$

I seem to get slightly different result when intersecting line segments vs interesting (infinite) lines.

RegionIntersection[Line[{{0, 0}, {2, 2}}], Line[{{0, 2}, {2, 0}}]]

results in

Point[{{1, 1}}]

while

RegionIntersection[InfiniteLine[{{0, 0}, {2, 2}}], InfiniteLine[{{0, 2}, {2, 0}}]]

results in

Point[{1, 1}]
$\endgroup$
  • 6
    $\begingroup$ It’s probably because 2 infinite lines can only intersect at one point, while two Line objects can intersect at multiple points $\endgroup$ – Carl Woll May 4 '19 at 2:55
  • $\begingroup$ @CarlWoll I think you should add this as an answer :) $\endgroup$ – Carl Lange May 4 '19 at 7:20
2
$\begingroup$

Following on from the Carls' comments that infinite lines can only intersect at one point, while two Line objects can intersect at multiple points.

We see that

RegionIntersection[Line[{{0, 0}, {2, 2}, {3, 3}}], Line[{{0, 2}, {2, 0}, {3, 3}}]]

indeed returns

Point[{{1, 1}, {3, 3}}]

So Line represents a Polygonal Chain rather than a Line Segment

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.