Message Boards Message Boards

1
|
364 Views
|
4 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Outer region of a polygon

POSTED BY: Frank Kampas
4 Replies

This also works:

pts = {{1, 1}, {-1, 1}, {-1, 0}, {-1/2, 0},
   {0, -1/2}, {0, -1}, {1, -1}};
RegionDifference[Rectangle[{-2, -2}, {2, 2}], Polygon[pts]]
POSTED BY: Gianluca Gorni

Your method has the boundary region going from -2 to 2 in the x and y directions. My method has the boundary region going from -Infinity to Infinity in the x and y directions.

enter image description here

POSTED BY: Frank Kampas

How about this?:

pts = {{1, 1}, {-1, 1}, {-1, 0}, {-1/2, 
    0}, {0, -1/2}, {0, -1}, {1, -1}};
exterior = RegionDifference[FullRegion[2], Polygon[pts]]
POSTED BY: Michael Rogers

That also works. Thanks

POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract