The Sphere mathbb S^n

# The $n$-sphere $\mathbb S^n$ embedded in $\mathbb R^{n+1}$

The Sphere $\mathcal M = \mathbb S^n$ posesses the following instances of the abstract types Manifold, MPoint, and TVector.

SnPoint <: MPoint

A point $x$ on the manifold $\mathcal M = \mathbb S^n$ represented by a unit vector from $\mathbb R^{n+1}$

source
SnTVector <: TVector

A tangent vector $\xi \in T_x\mathcal M$ on the manifold $\mathcal M = \mathbb S^n$. For the representation the tangent space can be given as $T_x\mathbb S^n = \bigl\{\xi \in \mathbb R^{n+1} \big| \langle x,\xi\rangle = 0\bigr\}$, where $\langle\cdot,\cdot\rangle$ denotes the Euclidean inner product on $\mathbb R^{n+1}$.

source
Sphere <: Manifold

The manifold $\mathcal M = \mathbb S^n$ of unit vectors in $\mathbb R^{n+1}$. This manifold is a matrix manifold (see IsMatrixM) and embedded (see IsEmbeddedM).

Abbreviation

Sn

Constructor

Sphere(n)

generate the sphere $\mathbb S^n$

Its abbreviation isSn.

source

## Functions

exp(M,x,ξ[, t=1.0])

Compute the exponential map on the Sphere M$=\mathbb S^n$ with respect to the SnPoint x and the SnTVector ξ, which can be shortened with t to tξ. The formula reads

$\exp_x\xi = \cos(\lVert\xi\rVert_2)x + \sin(\lVert\xi\rVert_2)\frac{\xi}{\lVert\xi\rVert_2}.$
source
log(M,x,y)

Compute the logarithmic map on the Sphere $\mathcal M=\mathbb S^n$, i.e. the SnTVector whose corresponding geodesic starting from SnPoint x reaches the SnPointy after time 1 on the Sphere M. The formula reads for $x\neq -y$

$\log_x y = d_{\mathbb S^n}(x,y)\frac{y-\langle x,y\rangle x}{\lVert y-\langle x,y\rangle x \rVert_2}.$
source
dot(M,x,ξ,ν)

Compute the Riemannian inner product for two SnTVectors ξ and ν from $T_x\mathcal M$ of the Sphere M given by $\langle \xi, \nu \rangle_x = \langle \xi,\nu \rangle$, i.e. the inner product in the embedded space $\mathbb R^{n+1}$.

source
norm(M,x,ξ)

Computes the norm of the SnTVector ξ in the tangent space $T_x\mathcal M$ at SnPoint x of the Sphere M.

source
distance(M,x,y)

Compute the Riemannian distance on $\mathcal M=\mathbb S^n$ embedded in $\mathbb R^{n+1}$, which is given by

$d_{\mathbb S^n}(x,y) = \operatorname{acos} \bigl(\langle x,y\rangle\bigr),$

where $\langle\cdot,\cdot\rangle$ denotes the Euclidean inner product on $\mathbb R^{n+1}$.

source
manifoldDimension(x)

returns the dimension of the Sphere M$=\mathbb S^n$, the SnPoint x, itself embedded in $\mathbb R^{n+1}$, belongs to.

source
manifoldDimension(M)

returns the dimension of the Sphere M.

source
opposite(M,x)

returns the antipodal point of x, i.e. $y = -x$.

source
parallelTransport(M,x,y,ξ)

Compute the paralllel transport of the SnTVector ξ from the tangent space $T_x\mathcal M$ at SnPoint x to $T_y\mathcal M$ at SnPointy on the Sphere M provided that the corresponding geodesic $g(\cdot;x,y)$ is unique. The formula reads

$P_{x\to y}(\xi) = \xi - \frac{\langle \log_xy,\xi\rangle_x}{d^2_{\mathbb S^n}(x,y)} \bigl(\log_xy + \log_yx \bigr).$
source
randomMPoint(M [,:Gaussian, σ=1.0])

return a random point on the Sphere by projecting a normal distirbuted vector from within the embedding to the sphere.

source
randomTVector(M,x [,:Gaussian,σ=1.0])

return a random tangent vector in the tangent space of the SnPoint x on the Sphere M.

source
typicalDistance(M)

returns the typical distance on the SphereSn: π.

source
validateMPoint(M,x)

validate, whether the SnPoint x is on the Sphere M$=\mathbb S^n$, i.e. that the vector is of the correct dimension $n$ and its norm is $\lVert x \rVert = 1$.

source
validateTVector(M,x,ξ)

validate, whether the tangent vector SnTVector ξ is in the tangent space of SnPoint x is on the Sphere M$=\mathbb S^n$, i.e. that all three lengths are correct and $x^\mathrm{T}\xi = 0$.

source
ξ = zeroTVector(M,x)

returns a zero vector in the tangent space $T_x\mathcal M$ of the SnPoint $x\in\mathbb S^n$ on the SphereSn`.

source