CanonicalizePolygon

CanonicalizePolygon[poly]

gives a canonical representation of the polygon poly with shared coordinates and with inner and outer boundaries.

CanonicalizePolygon[poly,"filter"]

gives a canonical representation of poly with the specified filter.

Details

  • CanonicalizePolygon is used to get a simple standard representation of a polygon from various representations and descriptions.
  • CanonicalizePolygon converts a polygon to an optimized standard form Polygon[{p1,p2,},{outer1,outer2inner2,}].
  • The points pi are the endpoints of nonintersecting line segments and sorted into Sort order.
  • An outer boundary outerk is a closed curve with line segments {pi,pj}, possibly touching at endpoints but no other crossings.
  • An inner boundary innerk is a closed curve with line segments {pi,pj}, possibly touching at endpoints but no other crossings.
  • The general polygon specification makes it possible to give degenerate polygons representing lines and points. By using the "filter" specification, it is possible to control whether these lower-dimensional components are kept.
  • Possible "filter" specifications include:
  • Allall components, including lines and points
    Fullfull-dimensional components only

Examples

open allclose all

Basic Examples  (1)

Find the canonical form of a Polygon:

Scope  (9)

Basic Uses  (7)

CanonicalizePolygon works on polygons:

Triangle:

Rectangle:

Polygon with holes:

CanonicalizePolygon works on polygons with geographic entities:

Polygon with GeoPosition:

Polygon with GeoPositionXYZ:

Polygon with GeoPositionENU:

Polygon with GeoGridPosition:

Self-intersecting polygons:

Polygons with disconnected components:

Polygons in :

Specifications  (2)

Find all components of polygons:

Find full-dimensional components of polygons:

Applications  (2)

Set up a graphics complex with shared coordinates:

Find self-intersection points of given segments:

Properties & Relations  (4)

Using CanonicalizePolygon to get PolygonCoordinates:

The CanonicalizePolygon of simple polygons preserves the number of polygon coordinates:

OuterPolygon gives the canonical representation of the outer polygon:

InnerPolygon gives the canonical representation of the inner polygon:

Possible Issues  (1)

CanonicalizePolygon works only on geometric regions:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_canonicalizepolygon, author="Wolfram Research", title="{CanonicalizePolygon}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/CanonicalizePolygon.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_canonicalizepolygon, organization={Wolfram Research}, title={CanonicalizePolygon}, year={2019}, url={https://reference.wolfram.com/language/ref/CanonicalizePolygon.html}, note=[Accessed: 22-November-2024 ]}