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 all close all

Basic Examples  (1)

Find the canonical form of 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  (7)

Applications  (2)

Properties & Relations  (4)

Possible Issues  (1)

Introduced in 2019
(12.0)