This is a follow-up to this 2017 question, in which we assume that we have a set of points $x_i$ on the Poincaré disk and a translation $F$ of point $x_0$ to $F(x_0) = x_{0}'$. We want to compute $F(x_i)$ for each point $x_i$ such that it preserves the distance and orientation of each point to another in hyperbolic space.
I understand from this answer that this alone is not enough to determine the function $F$, so we can assume that the line from $x_0$ to $x_0'$ is the axis of rotation for each point. What I don't understand is how to compute this concretely. Therefore I would like to ask how to compute the function F for example values (with no special meaning):
$x_0: (0.4, -0.2)$ and $F(x_0) = (0.35,-0.25)$
$x_1: (-0.2, 0.5)$
$x_2: (-0.6, -0.8$)
In this case, what would $F(x_1)$ and $F(x_2)$ be?
Context: I have been trying to create a write a JavaScript program that does this automatically for any point on the unit disk, but my results are wrong, so there must be something wrong with my computation.
As description, I will use complex numbers and their algebra, and also express Mobius transformations by two-by-two complex matrices, acting by $\pmatrix{a&b\cr c&d}(z)={az+b\over cz+d}$, as usual. All the Mobius transformations stabilizing the open unit disk preserve hyperbolic angles in hyperbolic triangles, and preserve hyperbolic distances between pairs of points. Composition of Mobius transformations is exactly given by multiplication of the corresponding matrices.
First, for $\beta$ in the open unit disk, $g_\beta=\pmatrix{1 & \beta\cr \overline{\beta}&1}$ maps $0$ to $\beta$. Further, this map is the unique such that preserves the geodesic connecting $0$ and $\beta$, namely, the diameter passing through $\beta$. Proving this is not soooo hard, but involves some ideas that are fancier than the mere computation itself.
Any conjugate $hg_\beta h^{-1}$ (matrix multiplication) for $h$ a Mobius transformation stabilizing the disk will have the same property with regard to the points $h(0)$ and $h(\beta)$.
Given $z,w$ in the unit disk, let $h=g_z$, and $\beta=h^{-1}(w)$. Then the matrix product $hg_\beta h^{-1}$ maps $z$ to $w$, and has the stabilizing-the-connecting-geodesic property.
In terms of programming, apart from finding packages to do such stuff, I'd definitely want to "package" the components, rather than have one big ghastly formula.
(In fact, this particular computation is easier on the disk rather than the upper half-plane, because the geodesic-generating elements are easier to write down...)