How can I get the center and radius of this circle?
Here's a one-liner for obtaining an implicit Cartesian equation:
circ = First[GroebnerBasis[ComplexExpand[Abs[(x + I y + 1)/(x + I y - 1)] == a,
TargetFunctions -> {Re, Im}], {x, y, a}]]
-1 + a^2 - 2 x - 2 a^2 x - x^2 + a^2 x^2 - y^2 + a^2 y^2
From here, we can use the technique from this answer:
vars = {x, y};
{cnst, lin, quad} = MapAt[Diagonal, Normal[CoefficientArrays[circ, vars]], {3}];
cnst + Total[MapThread[depress[#1 FromDigits[{##2}, #1]] &, {vars, quad, lin}]]
-1 + a^2 - (1 + a^2)^2/(-1 + a^2) +
(-1 + a^2) (-((2 + 2 a^2)/(2 (-1 + a^2))) + x)^2 - y^2 + a^2 y^2
Manual massaging of this result leads to the form
(x + (1 + a^2)/(1 - a^2))^2 + y^2 == (4 a^2)/(1 - a^2)^2
which means the result is a circle with center {(a^2 + 1)/(a^2 - 1), 0}
and radius Abs[2 a/(1 - a^2)]
.
For concrete values of a
this can be done as follows.
a=9/10;d = ImplicitRegion[ComplexExpand[Abs[(x + I y + 1)/(x + I y - 1)]] == a, {x, y}];
c = RegionCentroid[d]
{-(181/19), 0}
r=RegionDistance[d, c]
180/19
Something really cool I learned, but I cannot find the reference. Probably from one of the authors of Indra's Pearls...
There is a one-to-one correspondence between circles and Hermitian matrices of negative determinant. Thus, any circle may be represented by the Hermitian matrix
$H = \left[ \begin{array}{cc} 1 & -p \\ -p^* & |p|^2-r^2 \end{array} \right]$
where the complex number $p$ is the circle centre, and the real number $r$ is the circle radius.
The mapping of an input circle to an output circle is accomplished by $G=(M^{-1})^{T*} \cdot H \cdot M^{-1}$, where $M=\{\{a,b\},\{c,d\}\}$ in the Mobius transform. In component form,
$ G = \left[ \begin{array}{cc} d^* & -c^* \\ -b^* & a^* \end{array} \right] \cdot \left[ \begin{array}{cc} 1 & -p \\ -p^* & |p|^2-r^2 \end{array} \right] \cdot \left[ \begin{array}{cc} d & -b \\ -c & a \end{array} \right] $
where the superscript $*$ indicates complex conjugation. The result is another Hermitian matrix
$ G = \left[ \begin{array}{cc} A & B \\ B^* & C \end{array} \right] = \left[ \begin{array}{cc} 1 & -q \\ -q^* & |q|^2-s^2 \end{array} \right] $
corresponding to a new circle with centre $q$ and radius $s$.
MobiusMap
finds the coefficients $\{A,B,C\}$ of the Hermitian matrix $G$, and forms the output circle from them. It has a special case when $A=0$, resulting in a line $U x+V y+W=0$. Ratios taken to form the output circle are independent of whether or not the mapping has unit determinant.
MobiusMap[m_?MatrixQ, Circle[{x_, y_}, r_]] :=
Block[{v = -x - I y, w = x^2 + y^2 - r^2, a, b, c},
a = Abs[m[[2, 2]]]^2 + Abs[m[[2, 1]]]^2 w -
2 Re[m[[2, 1]] Conjugate[m[[2, 2]]] v];
b = m[[1, 1]] (Conjugate[m[[2, 2]]] v - Conjugate[m[[2, 1]]] w) +
m[[1, 2]] (Conjugate[v*m[[2, 1]]] - Conjugate[m[[2, 2]]]);
c = Abs[m[[1, 2]]]^2 + Abs[m[[1, 1]]]^2 w -
2 Re[m[[1, 1]] Conjugate[m[[1, 2]]] v];
If[
Chop[N[a]] == 0.,
LineUVW[{Re[b], Im[b]}, c/2],
Circle[-{Re[b], Im[b]}/a, Sqrt[b*Conjugate[b] - a*c]/Abs[a]]]
]
Your mapping is $M=\{\{1,1\},\{1,-1\}\}$. The Hermitian matrix corresponding to the mapped circle is $G=\{\{1 - r^2, 1 + r^2\}, \{1 + r^2, 1 - r^2\}\}$. Thus, the centre $q=-\{Re[B],Im[B]\}/A=\frac{r^2+1}{r^2-1}$, and the radius $s=\frac{2r}{Abs[1-r^2]}$.
Manipulate[
Module[{circle, q, s},
circle = MobiusMap[{{1, 1}, {1, -1}}, Circle[{0, 0}, r]];
q = circle[[1]];
s = circle[[2]];
Graphics[{Thick, PointSize[0.015],
Circle[{0, 0}, r], Point[{0, 0}],
Red, circle, Point[q]
}, GridLines -> Automatic, Frame -> True,
PlotLabel -> "Centre q: "<>ToString[q]<>" Radius s: "<>ToString[s]]],
{{r, 0.9, "Radius r"}, 0., 2., Appearance -> "Labeled"}]