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.
theorem
Polygon.HasNondegenerateEdges.two_le
{P : Type u_3}
{n : ℕ}
[NeZero n]
{poly : Polygon P n}
(h : poly.HasNondegenerateEdges)
:
def
Polygon.edgeSet
(R : Type u_1)
{V : Type u_2}
{P : Type u_3}
{n : ℕ}
[Ring R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[PartialOrder R]
(poly : Polygon P n)
(i : Fin n)
:
Set P
The i-th edge as a set of points using an affineSegment.
Instances For
theorem
Polygon.edgeSet_eq_image_edgePath
(R : Type u_1)
{V : Type u_2}
{P : Type u_3}
{n : ℕ}
[Ring R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[PartialOrder R]
(poly : Polygon P n)
(i : Fin n)
:
def
Polygon.boundary
(R : Type u_1)
{V : Type u_2}
{P : Type u_3}
{n : ℕ}
[Ring R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[PartialOrder R]
(poly : Polygon P n)
:
Set P
The boundary of the polygon is the union of all its edges.
Instances For
theorem
Polygon.HasNondegenerateVertices.hasNondegenerateEdges
{R : Type u_1}
{V : Type u_2}
{P : Type u_3}
{n : ℕ}
[Ring R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[NeZero n]
[Nontrivial R]
{poly : Polygon P n}
(h : HasNondegenerateVertices R poly)
:
Polygons with nondegenerate vertices also have nondegenerate edges.
theorem
Polygon.HasNondegenerateVertices.three_le
{R : Type u_1}
{V : Type u_2}
{P : Type u_3}
{n : ℕ}
[Ring R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[NeZero n]
[Nontrivial R]
{poly : Polygon P n}
(h : HasNondegenerateVertices R poly)
:
Interconversion with Affine.Triangle #
def
Polygon.toTriangle
(R : Type u_1)
{V : Type u_2}
{P : Type u_3}
[Ring R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(p : Polygon P 3)
(h : HasNondegenerateVertices R p)
:
Affine.Triangle R P
Convert a polygon with 3 nondegenerate vertices to an Affine.Triangle.
Instances For
@[simp]
theorem
Polygon.toTriangle_points
{R : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(p : Polygon P 3)
(h : HasNondegenerateVertices R p)
:
@[simp]
theorem
Polygon.toTriangle_toPolygon
{R : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(poly : Polygon P 3)
(h : HasNondegenerateVertices R poly)
:
Converting a 3-polygon to a triangle and back yields the original polygon.
theorem
Affine.Triangle.toPolygon_hasNondegenerateVertices
{R : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(t : Triangle R P)
:
The polygon obtained from a triangle has nondegenerate vertices.
@[simp]
theorem
Affine.Triangle.toPolygon_toTriangle
{R : Type u_1}
{V : Type u_2}
{P : Type u_3}
[Ring R]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(t : Triangle R P)
:
Converting a triangle to a polygon and back yields the original triangle.