Geometric meaning of the projection from the sphere to the complex plane In this answer from Mathematica.SE to a question regarding a video of the Möbius transformations, a function is defined as follows. 
Given $x=(x_1,x_2,x_3)$ and $y=(y_1,y_2,y_3)$ in $\mathbb{R}^3$, the output of the function is 
$$
\bigg(\frac{r(1+x_3)}{1+x_3-y_3}\cos(\theta+\pi)+x_1,
\frac{r(1+x_3)}{1+x_3-y_3}\sin(\theta+\pi)+x_2,0\bigg)
$$
where
$$
r:=\sqrt{(x_1-y_1)^2+(x_2-y_2)^2},\quad
\theta:=\arctan\frac{x_2-y_2}{x_1-y_1}.
$$
Would anybody explain why this is a "projection from the sphere to the (complex) plane"? What does the pair of points $x$ and $y$ mean?
 A: Let's assume for the moment that $x$ and $y$ are both supposed to be points ON the unit sphere. Then the big formula looks like
$$
(x_1, x_2, 0) + stuff
$$
so it represents a vertical projection of the point $x$, offset by some amount. The offset is in the direction of the ray from $x$ to $y$ (as seen from above (i.e., from a point infinitely far out along the $z$-axis). From the formula, it looks as if what's being done is something LIKE a stereographic projection from $x$: roughly: take a ray from $x$ through $y$, and see where it hits the $z = 0$ plane. 
That's not QUITE right, because the denominator isn't zero when $x$ and $y$ have the same third coord, but rather when those coords differ by $1$. So maybe it's more like this:
Take points $x$ and $y$. Raise $x$ up by one in the third coordinate. Draw a ray from this new location through $y$, and see where it hits the $z = 0$ plane. 
A: The coordinate of the center of the sphere $S$ is given by $x=(x_1,x_2,x_3)$ and the radius of the sphere is $1$. This makes sense since the output of the function is of the form $(R\cos\psi+x_1,R\sin\psi+x_2,0)$, which implies that $x_1,x_2$ are the first two coordinates of the center of the sphere.
On the other hand, $y=(y_1,y_2,y_3)$ is the coordinate of a point on the sphere. The output of the function gives the coordinate of the "sterographic projection" of $y$ (the intersection of the line (which goes through $y$ and the north pole of the sphere) with the complex plane). When $x=(0,0,0),$ the function coincides with the one defined in Wikipedia.  

One needs to be careful of the definition $\theta$ since in Mathematica, ArcTan[x,y] is different from the function $\arctan\frac{y}{x}$. For instance one has in Mathematica ArcTan[1,1]=$\frac{\pi}{4}$ and ArcTan[-1,-1]=$\frac{-3\pi}{4}$. This is why $\theta+\pi$ instead of $\theta$ is used in the output of the function. For the sake of a function, one could define $\theta$ as the angle of the vector $(y_1-x_1,y_2-x_2,0)$ with the $X_1$-axis and replace $\theta+\pi$ with $\theta$ in the output of the function. 
