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 ManifoldsM = 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.0

Types and functions

Most functions are directly implemented for an AbstractPowerManifold with ArrayPowerRepresentation except the following special cases:

ManifoldsBase.check_vector β€” Method
check_vector(M::Torus{n}, p, X; kwargs...)

Checks whether X is a valid tangent vector to p on the Torus M. This means, that p is valid, that X is of correct dimension and elementwise a tangent vector to the elements of p on the Circle.

source

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(ΞΈ + ΞΈβ‚€)\]

source
Manifolds.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)
source
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)$.

source