Inversion in an affine space #
In this file we define inversion in a sphere in an affine space. This map sends each point x
to
the point y
such that y -ᵥ c = (R / dist x c) ^ 2 • (x -ᵥ c)
, where c
and R
are the center
and the radius the sphere.
In many applications, it is convenient to assume that the inversions swaps the center and the point at infinity. In order to stay in the original affine space, we define the map so that it sends center to itself.
Currently, we prove only a few basic lemmas needed to prove Ptolemy's inequality, see
EuclideanGeometry.mul_dist_le_mul_dist_add_mul_dist
.
Inversion in a sphere in an affine space. This map sends each point x
to the point y
such
that y -ᵥ c = (R / dist x c) ^ 2 • (x -ᵥ c)
, where c
and R
are the center and the radius the
sphere.
Instances For
Basic properties #
In this section we prove that EuclideanGeometry.inversion c R
is involutive and preserves the
sphere Metric.sphere c R
. We also prove that the distance to the center of the image of x
under
this inversion is given by R ^ 2 / dist x c
.
Distance from the image of a point under inversion to the center. This formula accidentally
works for x = c
.
Distance from the center of an inversion to the image of a point under the inversion. This
formula accidentally works for x = c
.
Similarity of triangles #
If inversion with center O
sends A
to A'
and B
to B'
, then the triangle OB'A'
is similar
to the triangle OAB
with coefficient R ^ 2 / (|OA|*|OB|)
and the triangle OA'B
is similar to
the triangle OAB'
with coefficient |OB|/|OA|
. We formulate these statements in terms of ratios
of the lengths of their sides.
Distance between the images of two points under an inversion.
Ptolemy's inequality #
Ptolemy's inequality: in a quadrangle ABCD
, |AC| * |BD| ≤ |AB| * |CD| + |BC| * |AD|
. If
ABCD
is a convex cyclic polygon, then this inequality becomes an equality, see
EuclideanGeometry.mul_dist_add_mul_dist_eq_mul_dist_of_cospherical
.