Plane, axes, sphere, etc.

\(\(\(\ \ \ \ \)\(\(\(*\)\(f_\)  \(1\) \((z)\)\) = 
      z + d/c\ \ \ \ \((translation)\)

    \ \ \ \ \(\(*\)\(f_\)  \(2\) \((z)\)\) = 
      1/z\ \ \ \ \ \ \ \ \ \ \ \((inversion\ and\ reflection)\)

    \ \ \ \ \(\(*\)\(f_\)  \(3\) \((z)\)\) = \((\(-\((ad - bc)\)\)/
            c^2)\)\ \ z\ \ \ \ \ \((dilation\ and\ rotation)\)

    \ \ \ \ \(\(*\)\(f_\)  \(4\) \((z)\)\) = 
      z + a/c\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \((translation)\)\)\)\)

a = ar + ai*I
b = br + bi*I
c = cr + ci*I
d = dr + di*I

ComplexExpand[Re[d/c]] // Simplify
ComplexExpand[Im[d/c]] // Simplify

ComplexExpand[Re[-(a*d - b*c)/c^2]] // FullSimplify
ComplexExpand[Im[-(a*d - b*c)/c^2]] // FullSimplify

ComplexExpand[Re[a/c]] // Simplify
ComplexExpand[Im[a/c]] // Simplify

(a z + b)/(c z  +  d)

Clear[a, b, c, d, x0, y0, z0, u, v, p, dx, i, 
      j]

Needs["Graphics`Colors`"];
size = 10;
plane = {Thickness[0.001], GrayLevel[0.9], 
          makeMesh[{x, y, - .02}, {x, -size, size, 1}, {y, -size, 
              size, 1}]};
axes = {Thickness[0.002], GrayLevel[0.4], 
          makeCurve[{x, 0, - .01}, {x, -size, size, 1}], 
          makeCurve[{0, y, - .01}, {y, -size, size, 
              1}]};

Needs["Geometry`Rotations`"]
sphereMesh = {Thickness[0.001], GrayLevel[0.8], 
          makeMesh[
RotationMatrix3D[dTheta, dPhi, 
                  0] . {Cos[t] Sin[p] , Sin[t] Sin[p], Cos[p]} + {x0, y0, 
                z0}, {t, 0, 2  Pi, Pi/15. }, {p, 0, Pi, 
              Pi/10. }]};

  
  

f[u_, v_, 0, a_, b_, 
          c_] = {a - ((2 (1 + c) (a - u))/((((1 + c))^2) + (((a - u))^2) + (((b - v))^2))), 
          b + ((2 (1 + c) (-b + v))/((((1 + c))^2) + (((a - u))^2) + (((b - v))^2))), 
          1 + c - ((2 (((1 + c))^2))/((((1 + c))^2) + (((a - u))^2) + (((b - v))^2)))};
g[x_, y_, z_, a_, b_, 
          c_] = {((x + c x - a z)/(1 + c - z)), ((y + c y - b z)/(1 + c - z)), 0};

dx = 1/5;
\(\(pointList = 
        Flatten[
Table[
            Chop[
	
              RotationMatrix3D[dTheta, dPhi, 
                  0] . \((f @@ {i, j, 0, initX, initY, 
                      1})\)], 
{i, \(-1\), 1, 
              dx}, {j, \(-1\), 1, dx}], 
1]\ ;\) (*\ 
      Flatten[\ \(-\ \(\(,\)\(\ \)\(1\)\)\)]\ \ puts\ all\ points\ in\ one\ list\ *) 
\)
dx = 1;
\(pointList = 
      Flatten[
Table[
          Chop[
	
            Simplify[
                RotationMatrix3D[dTheta, dPhi, 
                    0] . \((f @@ {i, j, 0, initX, initY, 1})\)]\  + \ {x0, 
                y0, z0}], 
{i, \(-1\), 1, dx}, {j, \(-1\), 
            1, dx}], 
1]; \  (*\ 
      Flatten[\ \(-\ \(\(,\)\(\ \)\(1\)\)\)]\ \ puts\ all\ points\ in\ one\ list\ *) 

spherePoints\  = {PointSize[
          0.005], DeepCadmiumRed, 
        Point /@ pointList};\)
planePoints  = {PointSize[0.005], 
          Point /@ (g[#1, #2, #3, x0, y0, z0] & @@@ 
                pointList)};

scene = 
        Graphics3D[{plane, axes, sphereMesh, spherePoints, planePoints}, 
          Boxed -> False,  
          PlotRange -> {{-3, 3}, {-3, 3}, {-2, 
                2}}];

ShowLive[scene, Width -> 600, Height -> 600, 
        IndVars -> "{dTheta->0, dPhi->0, x0 -> 0, y0 -> 1, z0 -> 1, \
initX -> -1, initY -> 0}"];

dx = 3;
\(\(\(pointList\)\(=\)\(Flatten[
Table[
          Chop[
	
            Simplify[
              RotationMatrix3D[dTheta, dPhi, 
                  0] . \((f @@ {i, j, 0, initX, initY, 
                      1})\)]], 
{i, \(-1\), 1, 
            dx}, {j, \(-1\), 1, dx}], 
1]\)\(\ \)\( (*\ 
        Flatten[\ \(-\ \(\(,\)\(\ \)\(1\)\)\)]\ \ puts\ all\ points\ in\ one\ list\ *) \)\)\)

WriteLive["jomaMoebiusCoeff", scene, 
        IndVars -> "{dTheta->0, dPhi->0, x0 -> 0, y0 -> 0, z0 -> \
1}"];

AnimateLive[scene, {t, 0, 1, 1/50. }, Width -> 600, 
        Height -> 600, 
        DepVars -> "{dTheta->0, dPhi->0, x0 -> -1+2t, y0 -> 0, z0 -> \
1}"];

WriteLive["plane", 
      Graphics3D[plane, Boxed -> False, 
        PlotRange -> {{-3, 3}, {-3, 3}, {-2, 
              2}}]]