Polygons #
This file defines polygons in affine spaces.
For the special case n = 3, an interconversion is provided with Affine.Triangle.
Main definitions #
Polygon P n: A polygon withnvertices in a typeP.
A polygon with n vertices in a type P.
- vertices : Fin n โ P
The vertices of the polygon, indexed by
Fin n.
Instances For
A coercion to function so that vertices can
be written as poly i instead of poly.vertices i
A polygon has nondegenerate edges if adjacent vertices are distinct.
Instances For
The i-th edge as an affine map R โแต[R] P.
Instances For
The i-th edge as a set of points using an affineSegment.
Instances For
The boundary of the polygon is the union of all its edges.
Instances For
A polygon has nondegenerate vertices if any three consecutive vertices are affinely independent.
Instances For
Polygons with nondegenerate vertices also have nondegenerate edges.
Interconversion with Affine.Triangle #
Embedding from affine triangles to polygons with 3 vertices.
Instances For
Convert a polygon with 3 nondegenerate vertices to an Affine.Triangle.
Instances For
Converting a 3-polygon to a triangle and back yields the original polygon.
The polygon obtained from a triangle has nondegenerate vertices.
Converting a triangle to a polygon and back yields the original triangle.