Incenters and excenters of simplices. #
This file defines the insphere and exspheres of a simplex (tangent to the faces of the simplex), and the center and radius of such spheres.
The terms "exsphere", "excenter" and "exradius" are used in this file in a general sense where
a Finset signs of indices is given that determine, up to negating all the signs, which
vertices of the simplex lie on the same side of the opposite face as the excenter and which lie
on the opposite side of that face. This includes the cases of the insphere, incenter and
inradius, when signs is ∅ (or univ); the insphere always exists. It also includes the case
of an exsphere opposite a vertex, when signs is a singleton (or its complement), which always
exists in two or more dimensions. In three or more dimensions, there are further possibilities
for signs, and the corresponding excenters may or may not exist, depending on the choice of
simplex. For convenience, the most common definitions exsphere, excenter and exradius have
corresponding insphere, incenter and inradius definitions, and various lemmas are duplicated
for the case of the insphere to avoid needing to pass an ExcenterExists hypothesis in that case.
However, other definitions such as excenterWeights, touchpoint and touchpointWeights are not
duplicated.
Main definitions #
Affine.Simplex.ExcenterExistssays whether an excenter exists with a given set of indices.Affine.Simplex.excenterWeightsare the weights of the excenter with the given set of indices, if it exists, as an affine combination of the vertices.Affine.Simplex.exsphereis the exsphere with the given set of indices, if it exists, with shorthands:Affine.Simplex.excenterfor the center of this sphereAffine.Simplex.exradiusfor the radius of this sphere
Affine.Simplex.insphereis the insphere, with shorthands:Affine.Simplex.incenterfor the center of this sphereAffine.Simplex.inradiusfor the radius of this sphere
Affine.Simplex.touchpointfor the point where an exsphere of a simplex is tangent to one of the faces.Affine.Simplex.touchpointWeightsfor the weights of a touchpoint as an affine combination of the vertices.
References #
The unnormalized weights of the vertices in an affine combination that gives an excenter with signs determined by the given set of indices (for the empty set, this is the incenter; for a singleton set, this is the excenter opposite a vertex). An excenter with those signs exists if and only if the sum of these weights is nonzero (so the normalized weights sum to 1).
Instances For
Whether an excenter exists with a given choice of signs.
Equations
- s.ExcenterExists signs = (∑ i : Fin (n + 1), s.excenterWeightsUnnorm signs i ≠ 0)
Instances For
The normalized weights of the vertices in an affine combination that gives an excenter with signs determined by the given set of indices. An excenter with those signs exists if and only if the sum of these weights is 1.
Equations
- s.excenterWeights signs = (∑ i : Fin (n + 1), s.excenterWeightsUnnorm signs i)⁻¹ • s.excenterWeightsUnnorm signs
Instances For
Alias of the reverse direction of Affine.Simplex.sum_excenterWeights_eq_one_iff.
The existence of the incenter, expressed in terms of ExcenterExists.
The inverse of the distance from one vertex to the opposite face, expressed as a sum of multiples of that quantity for the other vertices. The multipliers, expressed here in terms of inner products, are equal to the cosines of angles between faces (informally, the inverse distances are proportional to the volumes of the faces and this is equivalent to expressing the volume of a face as the sum of the signed volumes of projections of the other faces onto that face).
The inverse of the distance from one vertex to the opposite face is less than the sum of that
quantity for the other vertices. This implies the existence of the excenter opposite that vertex;
it also gives information about the location of the incenter (see
excenterWeights_empty_lt_inv_two).
The existence of the excenter opposite a vertex (in two or more dimensions), expressed in
terms of ExcenterExists.
The barycentric coordinates of the incenter are less than 2⁻¹ (thus, it lies closer on an
angle bisector to the opposite side than to the vertex, or equivalently the image of the incenter
under a homothety with scale factor 2 about a vertex lies outside the simplex).
The exsphere with signs determined by the given set of indices (for the empty set, this is
the insphere; for a singleton set, this is the exsphere opposite a vertex). This is only
meaningful if s.ExcenterExists; otherwise, it is a sphere of radius zero at some arbitrary
point.
Equations
- s.exsphere signs = { center := (Finset.affineCombination ℝ Finset.univ s.points) (s.excenterWeights signs), radius := |(∑ i : Fin (n + 1), s.excenterWeightsUnnorm signs i)⁻¹| }
Instances For
The insphere of a simplex.
Instances For
The excenter with signs determined by the given set of indices (for the empty set, this is
the incenter; for a singleton set, this is the excenter opposite a vertex). This is only
meaningful if s.ExcenterExists signs; otherwise, it is some arbitrary point.
Instances For
The incenter of a simplex.
Instances For
The distance between an excenter and a face of the simplex (zero if no such excenter exists).
Instances For
The distance between the incenter and a face of the simplex.
Instances For
A touchpoint is where an exsphere of a simplex is tangent to one of the faces.
Equations
- s.touchpoint signs i = ↑((s.faceOpposite i).orthogonalProjectionSpan (s.excenter signs))
Instances For
A weaker version of touchpoint_mem_affineSpan.
The signed distance between the excenter and its projection in the plane of each face is the exradius.
The signed distance between the incenter and its projection in the plane of each face is the inradius.
In other words, the incenter is internally tangent to the faces.
The distance between the excenter and its projection in the plane of each face is the exradius.
The distance between the incenter and its projection in the plane of each face is the inradius.
An excenter is equidistant to any two of its touchpoints.
The incenter is equidistant to any two of its touchpoints.
The unique weights of the vertices in an affine combination equal to the given touchpoint.
Equations
- s.touchpointWeights signs i = ⋯.choose
Instances For
All excenters exist for a triangle.
An excenter of a triangle is either the incenter or the excenter opposite a vertex.
An excenter of a triangle is either the incenter or the excenter opposite one of three enumerated different vertices. This is intended for when it is known a point is an excenter and it is to be proved which excenter it is by elimination of the other cases.