A Klein bottle is a surface with only one side. Take a rectangle and glue one pair of opposite edges with a flip: leaving through the edge at \(t = \pi\) you re-enter at \(t = -\pi\) with the other direction reversed, \((t + 2\pi,\, s) \sim (t,\, -s)\). In three dimensions it cannot be built without passing through itself.

The picture on my home page was made with DGraphX, my graphing program written in C, from a parametric surface. This page uses the same formula (the figure-8 immersion of the Klein bottle) with \(t, s \in [-\pi, \pi]\):

\[\begin{aligned} r &= 3 + \cos\tfrac t2 \sin s - \sin\tfrac t2 \sin 2s,\\ x &= 3\, r \cos t, \qquad y = 3\, r \sin t,\\ z &= 3\left(\sin\tfrac t2 \sin s + \cos\tfrac t2 \sin 2s\right). \end{aligned}\]

It is a tube whose figure-8 cross-section makes a half-turn as it goes once around the loop of radius 3, so it has to pass through itself on the way back. You can check the gluing from the formula: replacing \(t\) by \(t + 2\pi\) flips the signs of \(\cos\frac t2\) and \(\sin\frac t2\), which is the same as replacing \(s\) by \(-s\). The factor 3 is only a scale.

In “Two sides” mode, purple is one side of the parametrisation and orange the other. They meet along a seam, the visible sign that there is no consistent inside and outside. “Cut away the top” shows where the surface passes through itself. Untick “exactly as in DGraphX” to change the tube and loop radius.

The original static image: klein_bottle.png (2770 × 1490). Source: DGraphX.