Tomographer
v1.0a
Tomographer C++ Framework Documentation
|
In N-dimensional Euclidian real space, we represent points with their cartesian coordinates x_i.
The Hyperspherical Coordinates is another representation for these points, with the new coordinates \( (r,\theta_1,\theta_2,\ldots,\theta_{N-1}) \) :
\begin{align*} r &\in [0,\infty[ \ ; \\ \theta_i &\in [0,\pi] \qquad\text{ for } i=1,\ldots,N-2 \ ; \\ \theta_{N-1} &\in [-\pi,\pi[ \ . \end{align*}
Routines that allow to compute the coordinate transforamtions, as well as corresponding jacobian and "differential" jacobian, are defined in tomographer/tools/sphcoords.h.
The transformation to cartesian coordinates is given by:
\begin{align*} x_1 &= r\,\cos\left(\theta_1\right) \ ;\\ x_2 &= r\,\sin\left(\theta_1\right)\cos\left(\theta_2\right) \ ;\\ & \ldots \\ x_{N-1} &= r\,\sin\left(\theta_1\right)\ldots\sin\left(\theta_{N-2}\right)\cos\left(\theta_{N-1}\right) \ ;\\ x_{N} &= r\,\sin\left(\theta_1\right)\ldots\sin\left(\theta_{N-2}\right)\sin\left(\theta_{N-1}\right) \ . \end{align*}
\begin{align*} x_1 &= r \cos\left(\theta_1\right) & &\text{ -- what we normally call Z;} \\ x_2 &= r \sin\left(\theta_1\right) \cos\left(\theta_2\right) & &\text{ -- what we normally call X;} \\ x_3 &= r \sin\left(\theta_1\right) \sin\left(\theta_2\right) & &\text{ -- what we normally call Y.} \end{align*}
So effectively, the angles count from (X=+1,Y=0,Z=0) and \(\theta_1\) increases to (X=-1,Y=0,Z=0); then \(\theta_2\) wraps around, with \(\theta_2=0\) corresponding to the direction in which Y=+1.