# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Compute the inversion of an object with respect to a reference circle in the Euclidean plane

Contributed by:
Shenghui Yang (Wolfram Research)
| shenghuiyang

ResourceFunction["CircleInversion"][ yields the inversion of |

The first argument must be of the form Circle[{*x*,*y*},*radius*].

The second argument can be any of the following objects: Line, InfiniteLine, Circle or Point. A list of two elements {*x*,*y*} that represents a 2D point is also supported.

The type of the result is dependent upon the *object* and whether it includes the center of inversion.

Inversion transforms the center of its reference circle to infinity and vice versa.

Invert point *P*_{1}={2,2} with respect to the reference unit circle :

In[1]:= |

Out[1]= |

This is the expected result from the power of a circle *r*^{2}=1^{2}=*OP*_{1}·*OP*_{2}:

In[2]:= |

Out[2]= |

Invert a circle to another circle:

In[3]:= |

Out[3]= |

CircleInversion works with arbitrary curves represented in parametric form for symbolic arguments. You can use ParametricPlot to visualize the transformed curve.

The inversion of a parabola is a cardioid if the center of inversion is the parabola's focus:

In[4]:= |

Out[2]= |

In[5]:= |

Out[5]= |

The inversion of an equilateral hyperbola is a lemniscate of Bernoulli if the reference circle is centered on the bisector of the hyperbola's two foci:

In[6]:= |

In[7]:= |

Out[7]= |

The inverse of a circle is another circle if the original circle does not contain the center of inversion:

In[8]:= |

Out[8]= |

The inverse of a circle is a line if the original circle contains the center of inversion:

In[9]:= |

Out[9]= |

The inverse of a line is a circle containing the center of inversion if the line does not contain the center:

In[10]:= |

Out[10]= |

A line inverts to itself if it contains the center of inversion:

In[11]:= |

Out[11]= |

CircleInversion is its own inverse:

In[12]:= |

Out[12]= |

In[13]:= |

Out[13]= |

Orthogonal circles are invariant under inversion with respect to each other. However, every point on each circle is inverted to a different place on the same circle (except for the intersection points):

In[14]:= |

Out[14]= |

In[15]:= |

Out[15]= |

For instance, the point (red) is on the Circle[{0,0},3], which is inverted to a different location (blue) on the same circle:

In[16]:= |

Out[16]= |

In[17]:= |

Out[17]= |

Its distance from the origin is still 3:

In[18]:= |

Out[18]= |

Regardless of the different types of objects returned by this function, the result of CircleInversion is in general closed under a set of objects recognized by Graphics:

In[19]:= |

Out[19]= |

The inverse of the center of the reference circle is defined as Infinity:

In[20]:= |

Out[20]= |

Conversely, the inverse of Infinity is the inversion center:

In[21]:= |

Out[21]= |

CircleInversion does not distinguish Line and InfiniteLine as the second argument:

In[22]:= |

Out[22]= |

In[23]:= |

Out[23]= |

CircleInversion returns different results based on the syntax of InfiniteLine.

For an infinite line that goes through {3,1} and {1,0}, which does not include the inversion center, its image is a circle containing the inversion center:

In[24]:= |

Out[24]= |

For an infinite line that passes through {3,1} and is in the same direction as the vector {1,0} (a horizontal line that passes through the inversion center), its image is the line itself:

In[25]:= |

Out[25]= |

Let three circles have a common point. Suppose that the common chord of two of them is a diameter of the third. If this is true for two of the three common chords, then we can prove that it must be true for all three of them. (C. S. Ogilvy, "Excursions in Geometry").

Prove by inversion: Convert the diagram on the left to the one on the right, and complete the proof with the concurrency of three altitudes in any triangle. The center of inversion is the concurrency of three circles:

Use Manipulate to see the invariance of the result by changing the configuration of the circles constrained by the statement of the problem:

In[26]:= |

Out[16]= |

Semicircles with centers at *A* (red) and *B* (blue) and with radii 2 and 1, respectively, are drawn in the interior of, and share bases with, a semicircle with diameter *JK*. The two smaller semicircles are externally tangent to each other and internally tangent to the largest semicircle (dashed). A circle centered at *P* is drawn externally tangent to the two smaller semicircles and internally tangent to the largest semicircle. What is the radius of the circle centered at *P* (2017 AMC 12A Problem 16)?

As described previously, the arbelos and chain of Pappus:

In[27]:= |

Out[16]= |

The result to the *n*^{th} circle in the chain by circle inversion can easily be generalized. Choose the center of inversion to be {0,0} and let the radius of the reference circle be 6 (marked by as the largest circle in the diagram at the bottom):

In[28]:= |

If you are looking for the radius of the first 15 circles in the chain, you have:

In[29]:= |

In[30]:= |

Out[31]= |

The framed part is the answer this problem is asking for. In the diagram below, each disk is the element in the chain of Pappus by inverting the circle with the same color from the column on the right:

In[32]:= |

Out[35]= |

The combination of inversion and a coaxial family (or pencil of circles) is the key step to finding the Steiner chain of two given non-intersecting circles. For 0<|*t*|<1, there are points , *B*={*t*,0}, *C*={1,0} and *D*={-1,0}. Then *A* and *B* are harmonic conjugates with respect to *C* and *D*. Define the *α* and *β* families of circles:

In[36]:= |

In[37]:= |

Any pair of circles, one from each family, intersects orthogonally:

In[38]:= |

Out[38]= |

Check the dot product of two vectors that sit at each center of the circles and point to the intersection:

In[39]:= |

Out[39]= |

This also proves that the locus of the center of circles in the *β* family (or the perpendicular bisector of segment *CD*) is the radical axis for any two circles in the *α* family.

Invert the circles in both coaxial families with respect to the reference circle centered at point *C*:

In[40]:= |

The *β* circles contain the inversion center, and they are thus mapped to lines. The inverses of the *α* circles are circles, and they must orthogonally intersect the inverses of the *β* circles. This is due to the anti-conformal property of circle inversion. The only possibility is that the inverse of the *α* circles are concentric circles with the common center at point *C*:

In[41]:= |

Out[42]= |

The result implies that you only need to consider the case of concentric circles to determine the number of circles in a closed Steiner chain, which is an easy task. This number is invariant under inversion.

- 1.0.2 – 15 February 2022
- 1.0.1 – 19 July 2021

This work is licensed under a Creative Commons Attribution 4.0 International License