Torus
The torus $𝕋^d ≅ [-π,π)^d$ is modeled as an AbstractPowerManifold of the (real-valued) Circle and uses ArrayPowerRepresentation. Points on the torus are hence row vectors, $x ∈ ℝ^{d}$.
Example
The following code can be used to make a three-dimensional torus $𝕋^3$ and compute a tangent vector:
using Manifolds
M = Torus(3)
p = [0.5, 0.0, 0.0]
q = [0.0, 0.5, 1.0]
X = log(M, p, q)3-element Vector{Float64}:
-0.5
0.5
1.0Types and functions
Most functions are directly implemented for an AbstractPowerManifold with ArrayPowerRepresentation except the following special cases:
Manifolds.Torus — Type
Torus{N} <: AbstractPowerManifoldThe n-dimensional torus is the $n$-dimensional product of the Circle.
The Circle is stored internally within M.manifold, such that all functions of AbstractPowerManifold can be used directly.
ManifoldsBase.check_point — Method
ManifoldsBase.check_vector — Method
Embedded Torus
Two-dimensional torus embedded in $ℝ^3$.
Manifolds.DefaultTorusAtlas — Type
DefaultTorusAtlas()Atlas for torus with charts indexed by two angles numbers $θ₀, φ₀ ∈ [-π, π)$. Inverse of a chart $(θ₀, φ₀)$ is given by
\[x(θ, φ) = (R + r\cos(θ + θ₀))\cos(φ + φ₀) \\ y(θ, φ) = (R + r\cos(θ + θ₀))\sin(φ + φ₀) \\ z(θ, φ) = r\sin(θ + θ₀)\]
sourceManifolds.EmbeddedTorus — Type
EmbeddedTorus{TR<:Real} <: AbstractDecoratorManifold{ℝ}Surface in ℝ³ described by parametric equations:
\[x(θ, φ) = (R + r\cos θ)\cos φ \\ y(θ, φ) = (R + r\cos θ)\sin φ \\ z(θ, φ) = r\sin θ\]
for θ, φ in $[-π, π)$. It is assumed that $R > r > 0$.
Alternative names include anchor ring, donut and doughnut.
Constructor
EmbeddedTorus(R, r)sourceManifolds.affine_connection — Method
affine_connection(M::EmbeddedTorus, A::DefaultTorusAtlas, i, a, Xc, Yc)Affine connection on EmbeddedTorus M.
Manifolds.check_chart_switch — Method
check_chart_switch(::EmbeddedTorus, A::DefaultTorusAtlas, i, a; ϵ = pi/3)Return true if parameters a lie closer than ϵ to chart boundary.
Manifolds.gaussian_curvature — Method
Manifolds.inverse_chart_injectivity_radius — Method
inverse_chart_injectivity_radius(M::AbstractManifold, A::AbstractAtlas, i)Injectivity radius of get_point for chart i from the DefaultTorusAtlas A of the EmbeddedTorus.
Manifolds.normal_vector — Method
normal_vector(M::EmbeddedTorus, p)Outward-pointing normal vector on the EmbeddedTorus at the point p.
ManifoldsBase.check_point — Method
check_point(M::EmbeddedTorus, p; kwargs...)Check whether p is a valid point on the EmbeddedTorus M. The tolerance for the last test can be set using the kwargs....
The method checks if $(p_1^2 + p_2^2 + p_3^2 + R^2 - r^2)^2$ is approximately equal to $4R^2(p_1^2 + p_2^2)$.
sourceManifoldsBase.check_vector — Method
check_vector(M::EmbeddedTorus, p, X; atol=eps(eltype(p)), kwargs...)Check whether X is a valid vector tangent to p on the EmbeddedTorus M. The method checks if the vector X is orthogonal to the vector normal to the torus, see normal_vector. Absolute tolerance can be set using atol.
ManifoldsBase.inner — Method
inner(M::EmbeddedTorus, ::DefaultTorusAtlas, i, a, Xc, Yc)Inner product on EmbeddedTorus in chart i in the DefaultTorusAtlas. between vectors with coordinates Xc and Yc tangent at point with parameters a. Vector coordinates must be given in the induced basis.