Digi Area Group - Math Tools for Professionals
   Maple and Mathematica packages - math tools for professionals

atlas™ - modern differential geometry for Maple™

> Features List & Examples
> Template Worksheets
> Screenshots
> Documentation & Downloads
> License & Pricing
> Buy Online

 
 
 
 
Google

Features List & Examples  |  Introduction  |  Dimension  |  Indexing  |  Forms  |  Metric  |  atlasWizard - Maplet™

Winding line on a torus

Copyright © 2004-2008  DigiArea Group . All rights reserved.

Description:

This worksheet illustrates how to use atlas  package to solve problems in elementary differential geometry. As an example we calculate curvatures  and moving frame  of a winding line on a torus. On the one hand the line is embedded into the Euclidian space. On the other hand the line is embedded into the torus. We assume that the torus is embedded into the Euclidian space and the metric tensor field of the torus is just the induced metric of the embedding.

[Maple Plot]

[Maple Plot]

Line embedded into the Euclidian space

Line embedded into the torus


In the first case we calculate the moving frame: principal normal , binormal  and tangent  vector fields for the embedded curve. We also calculate first and second curvatures  of the embedded curve which are known as curvature  and torsion  of the curve.
In the second case we calculate the moving frame:
principal normal  and tangent  vector fields for the embedded curve. Besides that we calculate first curvature  of the embedded curve.
As intermediate results we obtain
first fundamental forms  induced by the corresponding embedding on the curves and torus ( metric tensor field  for torus and squared differential of the curve's arc  for curves). Besides that we obtain second fundamental form  and mean curvature vector field  of the embedded torus.   

Solution:

Load atlas package:

restart:
with(atlas):

Just for right simplification:

`atlas/simp`:=proc(a) factor(simplify(a,trig)) end:

Description of the total space R^3

First of all we have to describe the space we are working in. The space is 3-dimensional Euclidean (flat) space. To define the space we declare domain , forms , vectors , coframe , frame , flat metric  and calculate connection  (it equals to zero of cause).

Define Euclidean space  as a manifold :
Domain(R^3);

R^3

Declare 1-forms  for the space coframe:
Forms(e[k]=1);

{e[k]}

Declare vectors  for the space frame:
Vectors(E[j]);

{U[k]}

Declare coframe  on the space:
Coframe(e[1]=d(x),e[2]=d(y),e[3]=d(z));

toruscurve7

Declare frame  on the space:
Frame(E[k]);

[E[1] = Diff(``,x), E[2] = Diff(``,y), E[3] = Diff(``,z)]

Declare flat metric  on the space:
Metric(g[R]=d(x)&.d(x)+d(y)&.d(y)+d(z)&.d(z));

g[R] = `&.`(e[1],e[1])+`&.`(e[2],e[2])+`&.`(e[3],e[3])

Calculate connection  of the metric:
Connection(omega);

omega[i,j]

Description of the curve C  (winding line on a torus)

Define the curve as a manifold:
Domain(C);

C

Declare constants a, b and m, n:
Constants(a,b,m,n);

{I, a, b, n, -I, Pi, _Z, m, Catalan}

Declare 1-form for curve's coframe
Forms(u[i]=1);

{e[k], u[i]}

Declare vectors for curve's frame:
Vectors(U[k]);

{U[k]}

Declare coframe on the curve:
Coframe(u[1]=d(tau));

[u[1] = d(tau)]

Declare frame of the curve:
Frame(U[l]);

[U[1] = Diff(``,tau)]

Mapping pi : proc (C) options operator, arrow; R^3 end proc and its invariants (metric, moving frame, curvature, torsion)

Declare mapping  of the curve into R^3 :
Mapping(pi,C,R^3,x=(a+b*cos(n*tau))*cos(m*tau),
                 y=(a+b*cos(n*tau))*sin(m*tau),
                 z=b*sin(n*tau));

pi

C.`--->`.(R^3)

One can also calculate metric  induced on the curve by the mapping:

Metric(g[C] = g[R] &/ pi);

g[C] = (m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)*`&.`(u[1],u[1])

It is obvious that the metric gives squared differential of the curve's arc : d(l)^2 = (m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)*d(tau)^2

Calculate invariants of the mapping:
Inv[pi]:=Invariants(pi):

Extract tangent  normalized vector field:

T1:=Inv[pi][basis][0];

T1 := -(sin(m*tau)*m*b*cos(n*tau)+b*sin(n*tau)*n*cos(m*tau)+sin(m*tau)*m*a)/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(1/2)*E[1]+(-b*sin(n*tau)*n*sin(m*tau)+cos(m*tau)*m*b*cos(n*tau)+...
T1 := -(sin(m*tau)*m*b*cos(n*tau)+b*sin(n*tau)*n*cos(m*tau)+sin(m*tau)*m*a)/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(1/2)*E[1]+(-b*sin(n*tau)*n*sin(m*tau)+cos(m*tau)*m*b*cos(n*tau)+...
T1 := -(sin(m*tau)*m*b*cos(n*tau)+b*sin(n*tau)*n*cos(m*tau)+sin(m*tau)*m*a)/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(1/2)*E[1]+(-b*sin(n*tau)*n*sin(m*tau)+cos(m*tau)*m*b*cos(n*tau)+...

Extract principal normal  normalized vector field:

N1:=Inv[pi][basis][1]:              #output suppressed for Web publishing

Extract binormal  normalized vector field:

B1:=Inv[pi][basis][2]:              #output suppressed for Web publishing

Extract curvature  of the curve:

k1:=Inv[pi][curvatures][1];

k1 := ((m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)*(m^6*a^4+4*b*m^6*a^3*cos(n*tau)+2*m^4*a^3*b*cos(n*tau)*n^2+6*b^2*m^6*a^2*cos(n*tau)^2+4*b^2*m^4*a^2*n^2+3*m^4*a^2*b^2*cos(n*tau)^2*n^2...
k1 := ((m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)*(m^6*a^4+4*b*m^6*a^3*cos(n*tau)+2*m^4*a^3*b*cos(n*tau)*n^2+6*b^2*m^6*a^2*cos(n*tau)^2+4*b^2*m^4*a^2*n^2+3*m^4*a^2*b^2*cos(n*tau)^2*n^2...
k1 := ((m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)*(m^6*a^4+4*b*m^6*a^3*cos(n*tau)+2*m^4*a^3*b*cos(n*tau)*n^2+6*b^2*m^6*a^2*cos(n*tau)^2+4*b^2*m^4*a^2*n^2+3*m^4*a^2*b^2*cos(n*tau)^2*n^2...
k1 := ((m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)*(m^6*a^4+4*b*m^6*a^3*cos(n*tau)+2*m^4*a^3*b*cos(n*tau)*n^2+6*b^2*m^6*a^2*cos(n*tau)^2+4*b^2*m^4*a^2*n^2+3*m^4*a^2*b^2*cos(n*tau)^2*n^2...
k1 := ((m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)*(m^6*a^4+4*b*m^6*a^3*cos(n*tau)+2*m^4*a^3*b*cos(n*tau)*n^2+6*b^2*m^6*a^2*cos(n*tau)^2+4*b^2*m^4*a^2*n^2+3*m^4*a^2*b^2*cos(n*tau)^2*n^2...

Extract torsion  of the curve:

chi1:=Inv[pi][curvatures][2];

chi1 := n*b*m*(-cos(n*tau)^3*b^2*m^4+m^2*cos(n*tau)^3*b^2*n^2-2*a*cos(n*tau)^2*b*m^4-4*a*cos(n*tau)^2*n^2*b*m^2+a^2*cos(n*tau)*n^2*m^2-4*b^2*n^2*m^2*cos(n*tau)-a^2*cos(n*tau)*m^4-2*b^2*n^4*cos(n*tau)+2...
chi1 := n*b*m*(-cos(n*tau)^3*b^2*m^4+m^2*cos(n*tau)^3*b^2*n^2-2*a*cos(n*tau)^2*b*m^4-4*a*cos(n*tau)^2*n^2*b*m^2+a^2*cos(n*tau)*n^2*m^2-4*b^2*n^2*m^2*cos(n*tau)-a^2*cos(n*tau)*m^4-2*b^2*n^4*cos(n*tau)+2...
chi1 := n*b*m*(-cos(n*tau)^3*b^2*m^4+m^2*cos(n*tau)^3*b^2*n^2-2*a*cos(n*tau)^2*b*m^4-4*a*cos(n*tau)^2*n^2*b*m^2+a^2*cos(n*tau)*n^2*m^2-4*b^2*n^2*m^2*cos(n*tau)-a^2*cos(n*tau)*m^4-2*b^2*n^4*cos(n*tau)+2...
chi1 := n*b*m*(-cos(n*tau)^3*b^2*m^4+m^2*cos(n*tau)^3*b^2*n^2-2*a*cos(n*tau)^2*b*m^4-4*a*cos(n*tau)^2*n^2*b*m^2+a^2*cos(n*tau)*n^2*m^2-4*b^2*n^2*m^2*cos(n*tau)-a^2*cos(n*tau)*m^4-2*b^2*n^4*cos(n*tau)+2...
chi1 := n*b*m*(-cos(n*tau)^3*b^2*m^4+m^2*cos(n*tau)^3*b^2*n^2-2*a*cos(n*tau)^2*b*m^4-4*a*cos(n*tau)^2*n^2*b*m^2+a^2*cos(n*tau)*n^2*m^2-4*b^2*n^2*m^2*cos(n*tau)-a^2*cos(n*tau)*m^4-2*b^2*n^4*cos(n*tau)+2...
chi1 := n*b*m*(-cos(n*tau)^3*b^2*m^4+m^2*cos(n*tau)^3*b^2*n^2-2*a*cos(n*tau)^2*b*m^4-4*a*cos(n*tau)^2*n^2*b*m^2+a^2*cos(n*tau)*n^2*m^2-4*b^2*n^2*m^2*cos(n*tau)-a^2*cos(n*tau)*m^4-2*b^2*n^4*cos(n*tau)+2...

Let us check the "orthonormality" of the moving frame vectors. To do this we use metric tensor field g[R] :  

'g[R](T1,T1)'=simplify(g[R](T1,T1));
'g[R](B1,B1)'=simplify(g[R](B1,B1));
'g[R](N1,N1)'=simplify(g[R](N1,N1));

g[R](T1,T1) = 1

g[R](B1,B1) = 1

g[R](N1,N1) = 1

'g[R](T1,N1)'=simplify(g[R](T1,N1));
'g[R](T1,B1)'=simplify(g[R](T1,B1));
'g[R](B1,N1)'=simplify(g[R](B1,N1));

g[R](T1,N1) = 0

g[R](T1,B1) = 0

g[R](B1,N1) = 0

Description of the torus T^2  

Define the torus  as a manifold:
Domain(T^2);

T^2

Declare 1-form for the torus coframe
Forms(phi[i]=1);

{e[k], u[i], phi[i]}

Declare vectors for the torus frame:
Vectors(Phi[j]);

{Phi[j]}

Declare coframe on the torus:
Coframe(phi[1]=d(alpha),phi[2]=d(beta));

[phi[1] = d(alpha), phi[2] = d(beta)]

Declare frame of the torus:
Frame(Phi[l]);

[Phi[1] = Diff(``,alpha), Phi[2] = Diff(``,beta)]

Embedding   f : proc (T) options operator, arrow; R^3 end proc and induced metric calculation

Declare mapping of the torus into R^3 :
Mapping(f,T^2,R^3,x=(a+b*cos(beta))*cos(alpha),
                  y=(a+b*cos(beta))*sin(alpha),
                  z=b*sin(beta));

f

T^2.`--->`.(R^3)

Calculate metric (induced by the embedding) on the torus using `&/` operator:
Metric(g[T] = g[R] &/ f);

g[T] = b^2*`&.`(phi[2],phi[2])+(a+b*cos(beta))^2*`&.`(phi[1],phi[1])

Calculate connection on the torus
Connection(Gamma);

Gamma[i,j]

Let us see the result:
eval(Gamma);

TABLE([(1, 1) = -1/(a+b*cos(beta))*b*sin(beta)*phi[2], (2, 1) = (a+b*cos(beta))/b*sin(beta)*phi[1], (2, 2) = 0, (1, 2) = -1/(a+b*cos(beta))*b*sin(beta)*phi[1]])

We can calculate the corresponding invariants of the mapping. The invarians are: second fundamental form  and field of mean curvature vectors . We do not need these quantities anyway, but it's hard to keep from the calculation:

Inv[f]:=Invariants(f);

Inv[f] := TABLE([meanCurvature = -cos(alpha)*cos(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta))*E[1]-sin(alpha)*cos(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta))*E[2]-sin(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta...
Inv[f] := TABLE([meanCurvature = -cos(alpha)*cos(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta))*E[1]-sin(alpha)*cos(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta))*E[2]-sin(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta...
Inv[f] := TABLE([meanCurvature = -cos(alpha)*cos(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta))*E[1]-sin(alpha)*cos(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta))*E[2]-sin(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta...
Inv[f] := TABLE([meanCurvature = -cos(alpha)*cos(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta))*E[1]-sin(alpha)*cos(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta))*E[2]-sin(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta...
Inv[f] := TABLE([meanCurvature = -cos(alpha)*cos(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta))*E[1]-sin(alpha)*cos(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta))*E[2]-sin(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta...
Inv[f] := TABLE([meanCurvature = -cos(alpha)*cos(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta))*E[1]-sin(alpha)*cos(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta))*E[2]-sin(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta...
Inv[f] := TABLE([meanCurvature = -cos(alpha)*cos(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta))*E[1]-sin(alpha)*cos(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta))*E[2]-sin(beta)*(2*b*cos(beta)+a)/b/(a+b*cos(beta...

Embedding psi :   proc (C) options operator, arrow; T^2 end procand its invariants (metric, moving frame, curvature)

Declare mapping of the curve into T^2 :
Mapping(psi,C,T^2,
             alpha=m*tau,
             beta=n*tau);

psi

C.`--->`.(T^2)

Calculate metric (induced by the embedding) on the curve using `&/` operator:
g[T] &/ psi;

(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)*`&.`(u[1],u[1])

Calculate invariants of the mapping:
Inv[psi]:=Invariants(psi);

Inv[psi] := TABLE([curvatures = TABLE(zero,[1 = [(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+2*b^2*n^2)*m*sin(n*tau)/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(3/2)]]), basis =...
Inv[psi] := TABLE([curvatures = TABLE(zero,[1 = [(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+2*b^2*n^2)*m*sin(n*tau)/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(3/2)]]), basis =...
Inv[psi] := TABLE([curvatures = TABLE(zero,[1 = [(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+2*b^2*n^2)*m*sin(n*tau)/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(3/2)]]), basis =...
Inv[psi] := TABLE([curvatures = TABLE(zero,[1 = [(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+2*b^2*n^2)*m*sin(n*tau)/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(3/2)]]), basis =...
Inv[psi] := TABLE([curvatures = TABLE(zero,[1 = [(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+2*b^2*n^2)*m*sin(n*tau)/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(3/2)]]), basis =...
Inv[psi] := TABLE([curvatures = TABLE(zero,[1 = [(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+2*b^2*n^2)*m*sin(n*tau)/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(3/2)]]), basis =...
Inv[psi] := TABLE([curvatures = TABLE(zero,[1 = [(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+2*b^2*n^2)*m*sin(n*tau)/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(3/2)]]), basis =...
Inv[psi] := TABLE([curvatures = TABLE(zero,[1 = [(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+2*b^2*n^2)*m*sin(n*tau)/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(3/2)]]), basis =...

Extract  tangent  normalized vector field:

T2:=Inv[psi][basis][0];

T2 := m/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(1/2)*Phi[1]+n*Phi[2]/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(1/2)
T2 := m/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(1/2)*Phi[1]+n*Phi[2]/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(1/2)

Extract principal normal  normalized vector field:

N2:=Inv[psi][basis][1];

N2 := -n*b/(a+b*cos(n*tau))/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(1/2)*Phi[1]+m*(a+b*cos(n*tau))/b/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(1/2)*Phi[2]
N2 := -n*b/(a+b*cos(n*tau))/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(1/2)*Phi[1]+m*(a+b*cos(n*tau))/b/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(1/2)*Phi[2]

Extract curvature  of the curve:

k2:=Inv[psi][curvatures][1];

k2 := (m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+2*b^2*n^2)*m*sin(n*tau)/(m^2*a^2+2*m^2*a*b*cos(n*tau)+m^2*b^2*cos(n*tau)^2+b^2*n^2)^(3/2)

Let us check the "orthonormality" of the moving frame vectors. To do this we use metric tensor field g[T]  , but in this case the metric is not flat and its components (in any coframe) are verify from one torus point to another:   

g[T]=ToBasis(g[T]);

g[T] = b^2*`&.`(phi[2],phi[2])+(a+b*cos(beta))^2*`&.`(phi[1],phi[1])

Thus we have to make calculations on the curve C:

sub:={alpha=m*tau,beta=n*tau};

sub := {alpha = m*tau, beta = n*tau}

'g[T](T2,T2)'=simplify(subs(sub,g[T](T2,T2)));
'g[T](N2,N2)'=simplify(subs(sub,g[T](N2,N2)));

g[T](T2,T2) = 1

g[T](N2,N2) = 1

'g[T](T2,N2)'=simplify(subs(sub,g[T](T2,N2)));

g[T](T2,N2) = 0