WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

InnerPolygon [poly]

gives the inner polygon of the polygon poly.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Properties & Relations  
See Also
Related Guides
History
Cite this Page

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 of a Polygon :

Wolfram Language code: 𝒫 = Polygon[{{0, 0}, {5, 0}, {2.5, 4}, {2, 1}, {2, 2}, {3, 2}, {3, 1}}, {1, 2, 3} -> {{4, 5, 6, 7}}];
Wolfram Language code: Graphics[𝒫]
Wolfram Language code: InnerPolygon[𝒫]

Scope  (6)

InnerPolygon works on polygons:

Wolfram Language code: Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, {1, 2, 3, 4}]
Wolfram Language code: InnerPolygon[%]

Triangle:

Wolfram Language code: InnerPolygon[Triangle[]]

Rectangle:

Wolfram Language code: InnerPolygon[Rectangle[]]

InnerPolygon works on polygons with GeoPosition :

Wolfram Language code: Polygon[GeoPosition[{{{40.083441, -88.235716}, {40.083607, -88.257488}, {40.082603, -88.257149}, {40.076136999999996, -88.25740499999999}, {40.076178, -88.270888}, {40.076516, -88.271558}, {40.083686, -88.271512}, {40.083659999999995, -88.267046}, ... 33323}, {40.098112, -88.228687}, {40.095216, -88.228627}, {40.095179, -88.238547}, {40.094480999999995, -88.238546}, {40.094508999999995, -88.23267}, {40.094106, -88.232556}, {40.090666999999996, -88.232477}, {40.090741, -88.235745}}}]];
Wolfram Language code: InnerPolygon[%]

Polygons with GeoGridPosition :

Wolfram Language code: Polygon[GeoGridPosition[{{{-0.9950503945490105, 1.2366760550756015}, {-0.9952074890903578, 1.2369207053693891}, {-0.9952196732768064, 1.2369073327446167}, {-0.9953160063787643, 1.236848436956935}, {-0.9954141759436825, 1.2369993898475449}, {-0. ... 197645333103}, {-0.9949098578570917, 1.2368130881428654}, {-0.9948663952535768, 1.2367477711687371}, {-0.9948714472169538, 1.2367426500757825}, {-0.9949211061652593, 1.2367089232486177}, {-0.9949439717990124, 1.236746107097628}}}, "Bonne"]];
Wolfram Language code: InnerPolygon[%]

Polygon with holes:

Wolfram Language code: 𝒫 = Polygon[{{0, 0}, {5, 0}, {2.5, 4}, {2, 1}, {2, 2}, {3, 2}, {3, 1}}, {1, 2, 3} -> {{4, 5, 6, 7}}];
Wolfram Language code: InnerPolygon[%]
Wolfram Language code: Graphics[𝒫]

Polygons with disconnected components:

Wolfram Language code: 𝒫 = Polygon[{{0, 0}, {1, 0}, {0, 1}, {1, 1}, {2, 1}, {1, 2}}, {{1, 2, 3}, {4, 5, 6}}];
Wolfram Language code: InnerPolygon[%]
Wolfram Language code: Graphics[𝒫]

Polygons in :

Wolfram Language code: Polygon[{{2, 3, 1, 0}, {6, 9, 1, 0}, {5, 4, 1, 0}, {8, 2, 1, 0}}, {1, 2, 3, 4}];
Wolfram Language code: InnerPolygon[%]

Properties & Relations  (1)

InnerPolygon of a simple polygon is an empty polygon:

Wolfram Language code: 𝒫 = RandomPolygon["Simple"]
Wolfram Language code: SimplePolygonQ[𝒫]
Wolfram Language code: InnerPolygon[𝒫]
Wolfram Research (2019), InnerPolygon, Wolfram Language function, https://reference.wolfram.com/language/ref/InnerPolygon.html.

Text

Wolfram Research (2019), InnerPolygon, Wolfram Language function, https://reference.wolfram.com/language/ref/InnerPolygon.html.

CMS

Wolfram Language. 2019. "InnerPolygon." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/InnerPolygon.html.

APA

Wolfram Language. (2019). InnerPolygon. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/InnerPolygon.html

BibTeX

@misc{reference.wolfram_2026_innerpolygon, author="Wolfram Research", title="{InnerPolygon}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/InnerPolygon.html}", note=[Accessed: 15-August-2026]}

BibLaTeX

@online{reference.wolfram_2026_innerpolygon, organization={Wolfram Research}, title={InnerPolygon}, year={2019}, url={https://reference.wolfram.com/language/ref/InnerPolygon.html}, note=[Accessed: 15-August-2026]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /