<jupyter_start><jupyter_text>Library ▸ Mathematics ▸ Geometry ▸ 2D ▸ Objects ▸ Polygon  Setup<jupyter_code>import Library.Mathematics as Mathematics
Point = Mathematics.Geometry.D2.Objects.Point
PointSet = Mathematics.Geometry.D2.Objects.PointSet
Polygon = Mathematics.Geometry.D2.Objects.Polygon
Transformation = Mathematics.Geometry.D2.Transformation<jupyter_output><empty_output><jupyter_text>---  Polygon **Constructors**<jupyter_code>polygon = Polygon([Point(0.0, 0.0), Point(1.0, 0.0), Point(1.0, 1.0), Point(0.0, 1.0)])
polygon = Polygon([Point(0.0, 0.0), Point(1.0, 0.0), Point(1.0, 1.0), Point(0.0, 1.0)], [[Point(0.5, 0.5), Point(0.5, 0.6), Point(0.6, 0.5)]])
Polygon.Undefined() ;<jupyter_output><empty_output><jupyter_text>**Operators**<jupyter_code>polygon == polygon ;
polygon != polygon ;<jupyter_output><empty_output><jupyter_text>**Methods**<jupyter_code>polygon.isDefined() ;
polygon.intersectsPolygon(polygon) ;
polygon.containsPoint(Point(0.0, 0.0)) ;
polygon.containsPointSet(PointSet([Point(0.0, 0.0)])) ;
polygon.getInnerRingCount() ;
polygon.getEdgeCount() ;
polygon.getVertexCount() ;
polygon.getOuterRing() ;
polygon.getInnerRingAt(0) ;
polygon.getEdgeAt(0) ;
polygon.getVertexAt(0) ;
# polygon.getEdges() ;
polygon.getVertices() ;
polygon.toString() ;
polygon.applyTransformation(Transformation.Identity()) ;<jupyter_output><empty_output>