InnerPolygon

InnerPolygon[poly]

gives the inner polygon of the polygon poly.

Details

  • InnerPolygon is also known as inner ring or hole.
  • Typically used to decompose a polygon as a difference of simple polygons, even when the original construction of the polygon was using crossing curves etc.
  • InnerPolygon is defined by the canonicalization performed in CanonicalizePolygon.
  • InnerPolygon gives a polygon of the form Polygon[{p1,p2,}, {{i1,i2,},}], where pk are explicit coordinates and ik are integer indexes referring to coordinates in the list {p1,p2,}.
  • If poly is a polygon without a hole, then the result is an EmptyRegion object.

Examples

open all close all

Basic Examples  (1)

Get the inner polygon from a Polygon:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Scope  (2)

Properties & Relations  (1)

Introduced in 2019
(12.0)