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.
Main definitions #
Affine.Simplex.ExcenterExists
says whether an excenter exists with a given set of indices (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).Affine.Simplex.excenterWeights
are the weights of the excenter with the given set of indices, if it exists, as an affine combination of the vertices.Affine.Simplex.exsphere
is the exsphere with the given set of indices, if it exists, with shorthands:Affine.Simplex.excenter
for the center of this sphereAffine.Simplex.exradius
for the radius of this sphere
Affine.Simplex.insphere
is the insphere, with shorthands:Affine.Simplex.incenter
for the center of this sphereAffine.Simplex.inradius
for the radius of this sphere
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 implies that the image of the incenter under a homothety with scale factor 2 about a vertex lies outside the simplex.
The existence of the excenter opposite a vertex (in two or more dimensions), expressed in
terms of ExcenterExists
.
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
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.
In other words, the exsphere is tangent to the faces.
The distance between the incenter and its projection in the plane of each face is the inradius.
In other words, the incenter is tangent to the faces.