Why does the first one return EmptyRegion[2]
while the second one works?
I expected the result is Line[{{0, 0}, {1, 1}}]
as the second one.
RegionIntersection[
Polygon[{{-1, 1}, {1, 1}, {1, 0}, {-1, 0}, {-1, 1}}],
Line[{{0, 0}, {1, 1}}]]
RegionIntersection[Polygon[{{-1, 1}, {1, 1}, {1, 0}, {-1, 0}}],
Line[{{0, 0}, {1, 1}}]]
Aslo how does EmptyRegion is defined? I read the docs but still not quite clear. It seems like a point is not empty in R but empty in R2.
How would I define a polygon region like above but without the boundary?