Group Abstract Group Abstract

Message Boards Message Boards

1
|
2K Views
|
6 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Outer region of a polygon

POSTED BY: Frank Kampas
6 Replies
Posted 7 days ago

Thanks for the different approaches — this clarifies the distinction between bounding with a finite rectangle and using FullRegion.

I have a related question: if the goal is to work symbolically with the true exterior region (unbounded) — for example to integrate over it or apply further region operations — is RegionDifference[FullRegion[2], [\[Polygon\]][1] ][pts]] always the preferred formulation?

In particular:

  • Does using FullRegion[2] have any performance or simplification implications compared to a large bounding rectangle?
  • Are there cases where Reduce[!Element[{x,y}, poly], …] would produce a more suitable representation for downstream symbolic manipulation?

I’m trying to understand which representation is more robust when the exterior region is used in subsequent analytic computations rather than just plotting.

Appreciate any insight.

POSTED BY: DannyMath Pro

Playing around with FullRegion[2] I discovered, to my surprise, that we can DiscretizeRegion the whole plane, without any warning, resulting in a square with finite measure:

DiscretizeRegion[FullRegion[2]]
RegionMeasure[%]

or even this:

BoundaryDiscretizeRegion[FullRegion[2]]
RegionMeasure[%]
POSTED BY: Gianluca Gorni

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