Inverse of stereographic projection

451 Views Asked by At

I am trying to compute the inverse of

$$f(\theta,\phi) = \left(\frac{\cos\theta \sin\phi}{1-\cos\phi}, \frac{\sin\theta \sin\phi}{1-\cos\phi}\right)$$ but I lack some basic knowledge on how I can do that. Could please provide some guidance?

Thank you in advance.

Edit: Following @peek-a-boo's comment (and M. Strochyk's answer), I have tried the following. For

$$f:\quad (\Theta,\Phi) \to (X,Y),\qquad (\theta,\phi)\mapsto (x,y):=\left(\frac{\cos\theta \sin\phi}{1-\cos\phi}, \frac{\sin\theta \sin\phi}{1-\cos\phi}\right),$$ and setting $$x = \frac{\cos \theta \sin \phi}{1 - \cos \phi},$$ and $$y = \frac{\sin \theta \sin \phi}{1 - \cos\phi},$$ we have

$$x^2+y^2 = \frac{1 +\cos \phi}{1 - \cos \phi},$$ and

$$\frac{y^2}{x^2} = \frac{\sin^2 \theta}{\cos^2 \theta}.$$

Combining the last two equations we obtain

$$x = \left|\cos \theta \right| \sqrt{\frac{1+\cos \theta}{1-\cos \theta}} ,$$ and

$$y = \left|\sin \theta \right| \sqrt{\frac{1+\cos \theta}{1-\cos \theta}},$$ which finally leads

$$f^{-1}:\quad(x,y)\mapsto (\theta,\phi) = \sqrt{\frac{1+\cos \theta}{1-\cos \theta}}\left(\left|\cos \theta \right| , \left|\sin \theta \right|\right)$$

2

There are 2 best solutions below

1
On BEST ANSWER

Let $f(\phi,\theta)=(x,y)$.

Then

$$\frac yx=\tan\theta$$ gives you $\theta$ (on the four quadrants). Next

$$\frac{\sin\phi}{1-\cos\phi}=\frac{2\sin\frac\phi2\cos\frac\phi2}{2\sin^2\frac\phi2}=\cot\frac\phi2=x\cos\theta+y\sin\theta.$$

gives you $\phi$.

3
On

I do not have enough reputation to comment yet. But here is a hint to an algorithm:

Set $a=\frac{\sin\phi}{1-\cos\phi}$ and rewrite the fuction $f$ into $g(\theta,a)=(a\cos\theta,a\sin\theta)$. You want to recover the input variables. Assume you have $x$ and $y$ given such that $x=a\cos\theta$ and $y=a\sin\theta$. To recover $a$ you have $a^2=x^2+y^2$ where $x$ and $y$ are known and then when you have $a$ you can obtain $\theta$ from $\tan\theta=\frac{y}{x}$. Further when you have $a$ you also recover $\phi$ from $a=\frac{\sin\phi}{1-\cos\phi}$ by use of some numerical solver. (You can build one yourself, a Newton solver).

Maybe someone here knows an analytic solution to obtain $\phi$?