Gluing two Moebius strips into  a Klein bottle

Introduction

Klein bottle is after projective plane the "simplest" closed, non-orientable surface. 
It is well known fact that one can obtain it  by gluing two Moebius strips. Although well known, that fact is not obvious. 
Here,  we are going to make a continuous deformation of a  Moebius strip into  a half-Klein bottle.
Having such a deformation it is easy to obtain an animation as this one below.

Evaluate following cell and wait to load the animation (check if file m2klein.gif is in the same directory as this notebook). Then double-click on picture to see the animation.

NotebookPath  =  ("FileName" /. 
              NotebookInformation[
                SelectedNotebook[]])[[1]];
PictureName  =  
        StringJoin[
          Flatten[Map[If[#  == "",  #,  List[#, "\\"]] &,  
              NotebookPath]],  "m2klein.gif"];
NotebookWrite[SelectedNotebook[], 
      Cell[CellGroupData[
          Map[Cell[
                GraphicsData["PostScript", 
                  ExportString[#1, "eps"]]] &, 
            Drop[Import[PictureName], 1]], Closed]]]

The deformation

Drawing the Klein bottle

Step  =  1;  Rot  =  0;    
ParametricPlot3D[
          Klein[u,  v], {u,  0,  2 Pi , 2 Pi/50},  {v,  0,  2 Pi,  
            2 Pi /20}, Boxed -> False, 
          ViewPoint -> {1, -3, 2.5},  Axes -> False];

Drawing the Moebius strip and the half-Klein bottle

TheMoebius  =  
        ParametricPlot3D[
          Moebius[Mod[u,  2  Pi],  v,  5], {u,  3 Pi/2,  
            3 Pi/2  +  2 Pi , 2 Pi/30},  {v,  -1,  1,  1/5}, 
          Boxed -> False, ViewPoint -> {1, -3, 2.5},  
          Axes -> False,  
          DisplayFunction -> Identity];
Rot = 0;  Step = 1;   
TheHalfKlein  =  
        ParametricPlot3D[
          Klein[u,  v], {u,  0,  2 Pi , 2 Pi/30},  {v,  Pi,  
            2 Pi,  2 Pi /20}, Boxed -> False, 
          ViewPoint -> {1, -3, 2.5},  Axes -> False,  
          DisplayFunction -> Identity];
Show[GraphicsArray[{TheMoebius,  TheHalfKlein}],  
          DisplayFunction -> $DisplayFunction];

By theory, those two objects are homeomorphic. Lets find a continuous deformation from one to another!

Step 1: How to get red of self-intersection? Of course, by rotating the half-Klein bottle

Step  =  1;
For[Rot = 0,  Rot  ≤ 5,  Rot++,  
      ParametricPlot3D[
        Klein[u,  v], {u,  0,  2 Pi , 2 Pi/50},  {v,  Pi,  2 Pi,  
          2 Pi /20}, Boxed -> False, 
        ViewPoint -> {1, -3, 2.5},  
        Axes -> False]]

Step2: Now, we shrink the half-bottle into the strip?

Rot  =  5; 
For[Step = 1, Step <= 10, Step += 3,    ParametricPlot3D[
            Klein[u,  v], {u,  0,  2 Pi , 2 Pi/50},  {v,  Pi,  
              2 Pi,  2 Pi /20}, Boxed -> False, 
            ViewPoint -> {1, -3, 2.5},  Axes -> False]
];

When Step goes to infinity we obtain a very flat half-Klein bottle

Step = 100;    Rot  =  5; 
ParametricPlot3D[
          Klein[u,  v], {u,  0,  2 Pi , 2 Pi/50},  {v,  Pi,  
            2 Pi,  2 Pi /20}, Boxed -> False, 
          ViewPoint -> {1, -3, 2.5},  Axes -> False];

Its continuation is a strip

ParametricPlot3D[
        Moebius[Mod[u,  2  Pi],  v,  0], {u,  3 Pi/2,  
          3 Pi/2  +  2 Pi , 2 Pi/50},  {v,  -1,  1,  1/6}, 
        Boxed -> False, ViewPoint -> {1, -3, 2.5},  
        Axes -> False];

Step 3: Now we deform this singular Moebius strip into smooth one by changing the parameter s, i.e. deforming the curve fMeb[u,s] over which Moebius strip is made.

For[s = 0,  s < 6,  s++, 
        ParametricPlot3D[
          Moebius[Mod[u,  2  Pi],  v,  s], {u,  3 Pi/2,  
            3 Pi/2  +  2 Pi , 2 Pi/50},  {v,  -1,  1,  1/6}, 
          Boxed -> False, ViewPoint -> {1, -3, 2.5},  
          Axes -> False]];

Implementation

First, we have to load some packages for later use.

<< NumericalMath`TrigFit`;
<< Graphics`ParametricPlot3D`;

We realize Klein bottle as a tube around certain curve f[u].
In order to do that we have to calculate normal and binormal vector of the curve f[u]

f[u_] := {6 Cos[u] (1 + Sin[u]),  16 Sin[u],  0} ;

t[u_] := {6 Cos[u]^2 - 6 Sin[u] (1 + Sin[u]), 
            16 Cos[u], 0} ;

tt[u_] := 
          If[0 ≤  u  <  3 Pi /2,   t[u]/
              Sqrt[t[u] . t[u]],  -t[u]/Sqrt[t[u] . t[u]]];

n[u_] := {-16 Cos[u],  
            6 Cos[u]^2 - 6 Sin[u] (1 + Sin[u]),  0};

nn[u_] := 
          If[0 ≤  u  <  3 Pi /2,   n[u]/
              Sqrt[n[u] . n[u]],  -n[u]/Sqrt[n[u] . n[u]]];

bb[u_] := N[Cross[tt[u],  nn[u]]];

Because of esthetical reasons the radius of a tube (bottle) have to be variable.  
Here are some data neccesary for variable radius (Rad[u]) of a Klein bottle.

Data = {2.`, 2.0681483474218636`, 2.267949192431123`, 
          2.585786437626905`, 3.`, 3.4823619097949585`, 4.`, 
          4.5176380902050415`, 5.`, 5.814213562373095`, 7.332050807568877`, 
          6.731851652578136`, 6.4`, 4.8692662705396415`, 3.17157287525381`, 
          2.304481869954854`};

Trigonometric fitting of the data gives  us a  satisfactory function for the radius

Rad[x_] := TrigFit[Data,  4,  {x, 0, 2 Pi}];

Things which follows will be more clear later. They are necessary for deformation of a half-Klein bottle into a Moebius strip.

The following function  gives rotation angle of  the  half-Klein bottle in order to get red of self-intersections. The start value  is for Rot=0 (no rotation), and end value is Rot=5 (rotation for 90 degrees).

Rot = 0;

Angle[u_] :=  Rot Pi  Sin[(u  -  Pi/2)/2]/10;

The following function  gives shrinking of the half-circles of the half-Klein bottle through ellipses into a segment of a Moebius strip. The  Step variable controls shrinking (Step = 1 for no shrinking). When Step goes to infinity  the smaller diameter of the ellipse becomes 0, while larger goes to 4-the length of the segment of a Moebius strip.

Step = 1;

a[u_] := 
          If[Step  > 1,  4  +  (Rad[u] - 4)/(2 Log[Step]),  
            Rad[u]];

b[u_]:=Rad[u]/Step

We need the rotation matrix.

RotationMatrix[
            phi_] := {{Cos[phi],  - Sin[phi]},  {Sin[phi],  
              Cos[phi]}};

Finally, here is the realization of the Klein bottle as a tube around the curve f[u].

Klein[u_,  phi_]:=       
f[u]  +  
          Transpose[{nn[u],  bb[u]}] . 
            RotationMatrix[-Angle[u]] . {a[u] Cos[phi],  
              b[u] Sin[phi]};

The realization of the Moebius strip  "around the curve" fMeb[u,s], (s= const, fMeb[u,0] = f[u]).
More precisely, for any curve  fMeb[u,s] in a Oxy plane one can realize a Moebius strip "over it" in a following way.  In a point fMeb[u=Pi/2,s] take a segment of a line perpendicular to Oxy plane and continuously rotate it over the curve as parameter u goes.

Here is the family of curves.

fMeb[u_,  
          s_] := { (6 + s) 
            Cos[u] (1 + (1 - s/5) Sin[u]),  (16 - s) Sin[u],  
          0};

T[u_,  s_] := Derivative[1, 0][fMeb[#1, #2] &][u,  
            s];

TT[u_,  s_] := T[u, s]/Sqrt[T[u, s] . T[u, s]];

NN[u_, s_] := Cross[TT[u, s], {0, 0, 1}];

In u=3Pi/2 the cusp make troubles

AngleMeb[u_] :=  
          If[3  Pi/2  ≤  u   ≤ 
              2  Pi ,  -Pi  Sin[(u  -  Pi/2)/2]/2,  
            Pi  Sin[(u  -  Pi/2)/2]/2];

Here is the realization of the family (parametrized by s) of the  Moebius strips

Moebius[u_,  v_, s_]:=       
N[
          fMeb[Mod[u,  2 Pi], s]  +  
            4  v    Transpose[{NN[Mod[u,  2 Pi], s],  {0, 0, 
                      1}}] . {Cos[AngleMeb[u]],  Sin[AngleMeb[u]]}];

Some additional explanations

How the Klein bottle is made?
As a tube around a curve f[u]. Notice that we needed a cusp (which happens for u = 3Pi/2) in order to let bottle go through itself.

BaseCurve  =  
        ParametricPlot3D[f[u],  {u, 0, 2 Pi},  
          ViewPoint -> {0, 0, 3}];

The radius of o tube

Plot[Rad[u],  {u,  0, 2 Pi}];

This is how "inner and outer" normal looks like.

InnerNormal  =  
        ParametricPlot3D[f[u] - Rad[u] nn[u],  {u,  0,  2 Pi},  
          ViewPoint -> {0, 0, 3}];
OuterNormal  =  
        ParametricPlot3D[f[u] + Rad[u] nn[u],  {u,  0,  2 Pi},  
          ViewPoint -> {0, 0, 3}];

This is the intersection of a Klein bottle with Oxy plane.

Show[BaseCurve,  InnerNormal,  OuterNormal];

Here is  the  family (with parameter s) of curves fMeb[u,s] (fMeb[u, 0] = f[0], fMeb[u,5] = circle). Over each curve the Moebius strip is made. In such way the singular Moebius strip is deformed into smooth one.

For[s = 0,  s < 6,  s++,  
        ParametricPlot3D[fMeb[u, s],  {u, 0, 2 Pi},  
          AspectRatio -> Automatic,  
          ViewPoint -> {0, 0, 3}]];

About

Version :  1.0
Date :  September 2000
Author :  Srdjan Vukmirovic
Address :  Studentski Trg 16,  Matematicki Fakultet,  
    11000 BELGRADE,  YUGOSLAVIA
Organization :  Faculty of Mathematics,  Belgrade,  
    Yugoslavia
e - mail :  vsrdjan@matf . bg . ac . yu
Scientific interests :  differential geometry,  
    field theory,  programming

Author will be thankful for any comment,  suggestion or question.