Our goal is to draw the familiar "laboratory glassware" model shown at right--and two variants appearing below. This is a real-world sort of model that claims no particular mathematical elegance, as do Tompkins' flat model in higher dimensions or Gray's model [GrayII,p.239] gotten by a revolving a figure-8.
Our model is constructed in two pieces, both derived from the same curve t
(sin3t, -t cos t).This curve is entered into Mathematica by
aa[t_]:={Sin[t]^3,-t*Cos[t]}
and plotted by
ParametricPlot[aa[t]//Evaluate,{t,0,Pi}]
The first piece of the bottle--its base B--is a surface of revolution
built as follows: Regard aa as lying in the xz plane. Move it distance
0.25 away from the z axis, then rotate it around that axis. Thus B is
parametrized by
aar[u_,v_]:={(0.25+Sin[v]^3)*Cos[u],
(0.25+Sin[v]^3)*Sin[u],-v*Cos[v]}
The resulting surface can be drawn by:
base = ParametricPlot3D[aar[u,v]//Evaluate,
{u,0,2Pi},{v,0,Pi},Boxed->False,Axes->None]
The other piece of the bottle is a tube of radius r=0.25 that will attach properly to the two holes in the base.
The core curve cc of the tube lies in the xz plane and is derived from
aa by (1) turning aa upside down, (2) lifting it by
,
and (3) inserting it in the xz plane. Thus Mathematica writes cc as
cc[t_] :={Sin[t]^3,0,Pi+t*Cos[t]}
Construction of the tube. We need two orthogonal vector fields on cc that lie in its normal plane at each point. Since cc in is the xz plane, the simplest such is just the unit vector in the y direction, {0,1,0}. Then the other unit vector field n will be in the xz plane and orthogonal to the velocity vector of cc.
Reversing the x and y components of the velocity cc'=d(cc)/dt of cc and changing the sign of one gives a vector field
pren[t_]:={-Cos[t]+t*Sin[t],0,3Sin[t]^2*Cos[t]}
in the xz plane and orthogonal to cc'. Thus the required unit vector field n is given by
n[t_]:=pren[t]/Sqrt[pren[t].pren[t]]
So the tube is parametrized by:
tb[u_,v_]:=cc[v] + 0.25*Cos[u]*n[v] + Sin[u}*{0,1,0}
and drawn by
tube = ParametricPlot3D[tb[u,v]//Evaluate,{u,0,2Pi},
{v,0,Pi},Boxed->False,Axes->None,PlotPoints->15]
(Here the PlotPoints specification makes the tube a better match for the base.)
The picture of the Klein bottle at the start of this section is produced by joining the base and tube, using the command
kb = Show[{base,tube}]
That picture conceals what is happening "inside" the bottle, so we drill a viewing hole.
This is done indirectly by using the Mathematica command PlotRange to plot everything except the hole. (Here "Automatic" places no restriction on the x and z coordinates.)
holedkb = Show[kb,PlotRange->
{Automatic,{-1.05,Pi},Automatic},
ViewPoint->{0.15,-2,0}]
The point from which the image is viewed has also been changed,
from the default value {x,y,z}={1.3, -2.4, 2) to a choice that will peer
into the viewing hole but still show the tube meeting the base.
Finally, we split the Klein bottle along its plane of symmetry. As the following figure shows, the result is a pair of Möbius bands. PlotRange is used to get one half, whose viewpoint is then suitably altered. The mirror copy is made by Graphical Converter (see later).