In a video titled “Knots to Narnia” [23], Bill Thurston presents an approach to visualizing “the cyclic branched cover of a knot by interpreting the knot as a portal to other universes.”Footnote 1 He demonstrates this using a wire to create different life-sized knotted portals. The wire is “magical,” and when its ends are joined, it creates a “rip in the fabric of the universe,” creating a portal from our world to a parallel world called Narnia, in reminiscence of the novels by C. S. Lewis. The only rule governing the portal is that by circling around the boundary curve twice, one returns to the original world in which one began. He then proceeds to explain the phenomena arising in the context of such portals by walking through this wire portal (see Figure 1).

Figure 1
figure 1

Bill Thurston stepping through a portal generated by the unknot from Earth to Narnia. (Photo by Tony Phillips, reproduced with permission.)

This notion of a portal being generated by a ring-shaped object is a quite common theme in movies and video games, and is mathematically quite simple. Thurston then proceeds to ask a question: What if the wire generating the portal were to be knotted? This leads to different regions in the knot generating multiple portals. But how many different portals would be generated, and into how many worlds would they lead? (See Figures 2, 3, 4 for the case of the twisted unknot.)

Figure 2
figure 2

A twisted unknot in KnotPortal, showing two portals into a different world, as seen from the first (ice) world.

Figure 3
figure 3

The same twisted unknot, now seen from the second (forest) world.

Figure 4
figure 4

A side view of the twisted unknot, revealing why “both” portals must lead into the same world; there is in fact only one portal.

The object being studied is a cyclic branched cover of order 2. This means that a knot defines a gluing of several sheets of \( \mathbb {R}^3 \), by regarding it as a branching curve. Each world is cut along surfaces generated by the knot in a way specified below, in the section on software, and then glued together according to permutations subject to certain rules. This is analogous to the two-dimensional case, where one has branch points and cut lines in the construction of, for example, the complex logarithm (see Figure 5).Footnote 2

Figure 5
figure 5

Creating a branched cover of the complex plane by first cutting from the branch point to infinity and then gluing together copies of the cut surface along the cutting line.

This representation of branched covers of knots is fascinating, and for the unknot, it is easy enough to imagine.Footnote 3 If, however, the branching curve is knotted, it requires considerable imagination to be able to picture these portals, even for simple cases. This gave the motivation to implement this vision as a computer program, to further re-create Thurston’s experience of being able to step through portals as a virtual reality software, giving users the possibility not only to see these portals but actually to walk through them as Thurston did (see Figure 6).

This paper presents the implementation of this software and a description of the mathematics involved in the construction of the portals as well as the group structures given by them. Readers interested in only the mathematical background of branched coverings of knots may read only the section on that topic and perhaps some of the examples in the final section. For understanding the project, all sections should be read in order, jumping to the examples on occasion. These are of particular interest to those wanting to add their own knots to KnotPortal, since we give an algorithm for doing so.

Regardless of the motivation, the reader is strongly advised to try out the software, or at least watch videos of its use.Footnote 4

Figure 6
figure 6

The author stepping through a portal given by the unknot. Screenshot from https://youtu.be/Pgmfsl1e_vA.

Project History

Previous projects also concerned with the modeling of branched covers of knots include the software Polycut, by Ken Brakke [4]. This software was designed “for visualizing multiple universes connected by a certain kind of wormhole,” with the purpose of illustrating “the author’s contention that soap films are best viewed as minimal cuts in covering spaces.” In the software, the user can view different knots and links and some of their branched covers as differently colored regions, as well as soap films, which are the minimal surfaces separating the sheets.

We wanted to achieve something different, since our goal was to give a real “world” instead of just colors, as well as to realize a virtual reality experience.

There was an attempt to achieve this by porting Ken Brakke’s code to CAVE virtual reality technology by George Francis, Alison Ortony, Elizabeth Denne, Stuart Levy, and John Sullivan during the illiMath2001 research program. However, that attempt remained unfruitful: “Though a complete solution to this visualization problem still eludes us, extensive geometrical documentation and evaluation of extant software was undertaken this summer and presented as a PME talk at MathFest, Madison, WI.”Footnote 5

In this project, we achieved our goal through a new software called KnotPortal, using the combination of a game engine and a head-mounted virtual reality (VR) device capable of room-scale tracking (see Figure 6). In our software, the user can move around in a fully immersive experience featuring different real worlds. It is adaptable, for new knots can easily be added, and a non-VR version for use with a normal desktop computer can be used if a VR-headset is unavailable.

Mathematical Background

While this section gives a short overview of branched coverings, readers interested in this topic might want to consult a more comprehensive resource. Most standard textbooks on algebraic topology will do.

Branched Coverings

A covering map is a map p from a covering space E to a base space X such that for all \( x \in X \), the preimage \( p^{-1}(U_x) \) of every neighborhood \( U_x \) of x is a disjoint union of open sets \( {{\tilde{U}}}_{i \in I} \), with \( {\tilde{U}}_i \) homeomorphic to \( U_x \) for every \( i \in I \). The cardinality of the index set I is also called the degree of the cover. In words, this means that every part of the base space has copies of itself above it. Besides the trivial covering of the disjoint union of copies of a space covering the space itself, the classical example is the exponential spiral. It is defined by the covering map \( p:\mathbb {R} \rightarrow \mathbb {S}^1 \), \( p(t) = \exp ^{2\pi i t} \), from the covering space \( \mathbb {R} \) to the base space \( \mathbb {S}^1 \); see Figure 7.

Figure 7
figure 7

The real line \(\mathbb {R}\) coiled over the circle \(\mathbb {S}^1\). Every neighborhood of a point on the circle has countably infinitely many copies above it.

If the assumption of every point being covered as described above is relaxed to most points, one obtains branched covering maps. To be precise, a map p is a branched covering map if it is a covering map for all points other than those in a nowhere dense set \( S \subseteq B \), called the set of branch points. A classical example is the complex logarithm used as a countably infinite cover of the complex plane, giving rise to the logarithmic spiral in Figure 5.

Another example is depicted in Figure 8. It describes the construction of a branched double cover of the sphere by a torus with four branch points. A sphere is cut twice, which is homeomorphic to an open cylinder or a half-torus. Two half-tori are glued together to yield a torus, so that every point on the sphere except the points on the cuts has a corresponding point on each half-torus.

Figure 8
figure 8

From left to right, the construction of a double cover of the sphere by the torus, by cutting up a sphere and gluing it to a copy of itself. Marked in black are the four branch points. (Screenshot from TinkerCAD.)

A second, somewhat more complex, example of a branched cover of the sphere by a torus with four branch points is given by the Peirce quincuncial projection (see Figure 9, or consult [3] for a complete explanation). In this case, the two disjoint arcs along which we cut in the previous example are chosen to cross each other. This can be visualized by projecting the sphere onto an octahedron and then unfolding the octahedron by cutting all edges adjacent to a vertex on the square equator. The flattened version gives a square with the south pole at all corners (see Figure 9a). This square can tile the plane by point reflection on the midpoint of the sides, as shown in Figure 9b. This then defines a branched double covering of the sphere by the torus, depicted in Figure 9d, with covering space the torus, and base space the sphere.

Figure 9
figure 9

Different views of the Peirce quincuncial map projection.

Every point on the globe is present on the torus twice, except for the branch points, which are present only once. Going around one of the branch points in the covering space also means going around the point on the globe twice. This is not apparent on the map, since Peirce placed the branch points in oceans, making them less visible.

Branched covers of the sphere, such as those presented in these examples, are ubiquitous, as made precise by the Riemann existence theorem: every Riemann surface is a branched cover of the sphere [8].

History of the Relationship Between Knots and Branched Coverings

Knots can be found everywhere in our world, and applications of knot theory range from understanding why headphones get tangled spontaneously [19] to phenomena in quantum physics [13]. Although knots are found throughout human history, such as the famous Gordian knot, their modern mathematical study began in the eighteenth century with the work of Alexandre-Théophile Vandermonde [25], increasing with the rise of topology [16]. The first applications of known mathematical methods to knots came with Henri Poincaré’s Analysis Situs [15]. Poul Heegaard used topological methods to compute the twofold branched covering of the trefoil knot [9], but he did not use the result to discriminate the trefoil from the unknot, since this now central problem of knot theory was not of interest to him and was proved only later, by Heinrich Tietze in 1908, using the fundamental group [20, p. 226]. He used the cover to construct Riemann spaces analogous to the construction of Riemann surfaces in one dimension higher [21].

James Alexander then proved in [2] that “Every closed orientable triangulable n-manifold M is a branched covering of the n-dimensional sphere,” an extension to branched coverings of spheres of the Riemann existence theorem. The theory was developed even further when Hinden et al. [10] provided a universal knot, a knot such that every 3-manifold is a branched cover of the sphere with the knot as a branching set.Footnote 6

The knot itself became a focus of attention when Wilhelm Wirtinger extended Heegaard’s results and, together with his student Tietze, used the construction to compute a presentation of the fundamental group of the knot complement for every knot [6]. The knot group is thus a result of considerations of branched coverings of knots.

Software

The software was created with Unity3D [24], and the virtual reality gear is HP Mixed Reality.Footnote 7 Scripts are in C# or, for the shaders, in DirectX 9-style HLSL. The deck transformation groups determining the gluing of the worlds as quotients of the respective knot group, as well as the associated multiplication tables, were computed with the help of GAP [7].

Input

As input, the software is given a knot through some parameterization, as well as a group multiplication table that can be generated with GAP. Examples for knot parameterizations together with group multiplication tables are given in the examples section. The software further needs a map defining which cone segment (see below) gets assigned to which group element, the generator-to-cone map.

Setting Up the Cut Surface

At the start of the program, the following steps are carried out:

  1. 1.

    Build all needed worlds.

  2. 2.

    Set up a camera in each world, moving and rotating as the player camera moves and rotates.

  3. 3.

    Let each camera render to a full-screen-sized texture, and assign the textures to the postprocessing shader.

Figure 10
figure 10

The Heegaard [9]/Reidemeister [17] cone construction for the trefoil knot. The cone has three self-intersecting lines, resulting in three cone segments (as depicted in [20]).

Then in the first world, we apply the cone construction from [9] to the knot; see Figure 10. The goal is to provide a cut surface for the gluing of the worlds. This is analogous to the cut line given in the construction of the domain of the complex logarithm in Figure 5. In our case, we cut from the branch curve to a point at infinity (in the implementation, a point sufficiently far away), so that the knot is in general position from its point of view. This defines a cone or cylinder,Footnote 8 and we glue together the different worlds along the cutting surface. We continue as follows:

  1. 1.

    The knot is placed in the world as a tubular mesh around a Catmull–Rom non-self-intersecting closed spline, given the control points from the discretized parameterization.

  2. 2.

    A point p is chosen, from which a normal knot projection is obtained.

  3. 3.

    A cone is built from this point by building a mesh formed by the triangles obtained through filling all line segments from p to every start and end of the line segments of the knot. This results in a sort of cone, possibly self-intersecting.

  4. 4.

    The cone is cut along the intersections, leading to a number of mesh pieces. These are duplicated, and the duplicated pieces have their normals flipped to give a reverse side.

  5. 5.

    Each cone segment is assigned a generator of the group according to the provided generator-to-cone map. Its reverse side gets assigned the inverse of the generator.

Now in each frame, if the knot is visible, perform the following steps on the CPU:

  1. 1.

    Transform the knot’s anchor points from world space into screen space.

  2. 2.

    Using the line segments, divide the screen space into polygonal regions by an algorithm of [5].

  3. 3.

    Find a central point in each region using a C# port of the polylabel algorithmFootnote 9 from which to find the pole of inaccessibility of the region.

  4. 4.

    Raycast each point from the camera, multiplying the current world generator by every generator from a cone segment encountered along the way. In this way, build a map assigning a generator to each polygonal screen region.

Figure 11
figure 11

Portals through the unknot, the twisted unknot, and the trefoil knot.

Then run the following steps in the postprocessing shader:

  1. 1.

    For each pixel, perform an optimized point-in-polygon test.Footnote 10

  2. 2.

    Assign to the pixel the pixel from the camera texture of the world corresponding to the polygon’s generator.

Player Teleportation

In each frame, perform a raycast from the player’s old position to his new one. Multiply the current world generator by every cone segment’s generator encountered by the raycast, giving the new world. Teleport the player to the point in the identical place, but in the new world.

This implies that in contrast to expectation, teleportation occurs much later (or earlier, depending on the direction of approach to the knot) than one might think. It does not happen as one “passes through the portal,” but as one passes through the cut surfaces, i.e., the cone segments, which are the “real” portal.

World Design

The software comes with two different sets of worlds: simple and real. The simple worlds are featureless colored places to enable low-end hardware to run the program and for a more minimalist experience.

The other kind are the real worlds (such as in Figure 11), which give a richer experience. They were designed with several goals in mind. First, they should be interesting enough to give the user a real motivation to step through the portal and look into other worlds. Second, they should not be too interesting, in order to keep the focus of the experience on the knot and the portals, and not the world. The worlds are also color-coded, to enable the user to speak about the “white world” or the “blue world,” which is also helpful in keeping the worlds apart, as well as easing the transition between simple and real worlds. The color codes were taken mainly from naturally occurring colors, with the addition of some colors not present on this planet but possibly on others [11].

Example Cases

The cases presented here all describe branched covers of order 2; that is, the knot as the branching curve has order 2. So a path going around a knot segment twice returns to the same world (sheet) in which it began.

In general, the construction of the deck transformation groups is well known. Given a (based) cyclic branched covering \( p:(E,e_0) \rightarrow (X,x_0) \), the deck transformation groups can be computed through the Wirtinger presentation together with the fundamental theorem of covering spaces.

The Wirtinger presentation gives the generators of the knot group as loops around the knot strands, together with relations between them for every crossing of the strands.

The fundamental theorem then states that the deck transformation group is isomorphic to

$$\begin{aligned} \pi _1(X,x_0) / p_\star (\pi _1(E,e_0))\,. \end{aligned}$$
(1)

Given a presentation

$$\begin{aligned} \langle g_1, \dotsc , g_n \mid R_1, \dotsc , R_m \rangle \end{aligned}$$
(2)

of the knot group, we have, since the covering is cyclic,

$$\begin{aligned} p_\star (\pi _1(E,e_0)) \cong \left\langle g_1^{k_1}, \dotsc , g_n^{k_n} \mid R_1, \dotsc , R_m \right\rangle \end{aligned}$$
(3)

for some coefficients \( k_1, \dotsc , k_n \). Since we restrict ourselves to branched covers of order 2, the coefficients are all 2.

The Unknot

For the unknot K (see Figure 12), the knot group is \( \pi _1(\mathbb {S}^3 \setminus K) \), which is \( \pi _1(\mathbb {S}^1 \times D^2) \cong \mathbb {Z} \) with presentation \( \left\langle a \right\rangle \). We take the quotient of this group and the subgroup \( \langle a^2 \rangle \), which is induced by the fundamental group of the covering space, since the simple generating loop has to go around the unknot twice before returning to the base point. This results in the presentation \( \left\langle a \mid a^2 \right\rangle \). This is thus a twofold covering with deck transformation group \( \mathbb {Z}_2 \), or equivalently the (Coxeter) group \( A_1 \).

Figure 12
figure 12

The unknot under the z-projection.

The unknot is represented in the software through the parametric equations \( \left( {\begin{matrix} 0.8 \sin t\\ 1.5 \cos t\\ 0 \end{matrix}}\right) \). It generates \( |A_1| = 2 \) worlds, and has one portal. The group multiplication matrix of \( A_1 \) is \(\left( {\begin{matrix} e &{} a \\ a &{} e \end{matrix}}\right) \). Since the cone associated with this knot has no self-intersections, the generator-to-cone map is trivial, assigning every cone segment the group element a.

The Twisted Unknot

The case of the twisted unknot (see Figure 13) is, of course, the same as that of the unknot from a knot-theoretical standpoint. As for the implementation, the knot is given by

$$\begin{aligned} \begin{pmatrix} 2 \sin (t+1)\\ 3 \sin (t+1) \cos (t+1)\\ \sin t \end{pmatrix} , \end{aligned}$$

but since there are two portals leading to the same world, the generator-to-cone map assigns a to both cone segments.

Figure 13
figure 13

The twisted unknot under the z-projection.

The Trefoil Knot

For the trefoil knot K (see Figure 14), the knot group is \( \left\langle a,b \mid a^3 = b^2 \right\rangle \), since the trefoil knot is the (2, 3) torus knot [20]. Alternatively, it can be given by \( \left\langle x,y \mid xyx = yxy \right\rangle \) [18, p. 61]. Using \( xyx = yxy \cong xyxxyx = xyxyxy \cong yxyxyx = (xy)^3 \cong {yxx}{yxx} = (xy)^3 \cong (yxx)^2 = (xy)^3\), we can see the isomorphism between the two presentations. Adding the relations \( x^2 \) and \( y^2 \), we obtain the presentation \( \left\langle a,b \mid (xy)^3, x^2, y^2 \right\rangle \). This is the dihedral group of the triangle, and a Coxeter group with Coxeter matrix \( \left( {\begin{matrix} 1 &{} 3 \\ 3 &{} 1 \end{matrix}}\right) \). The group order 6 implies the construction of six worlds from this knot. In general, the r-fold branched covering of the torus knots of type (pq) is a Brieskorn manifold M(pqr), the intersection of the 5-sphere \( \mathbb {S}^5 \) in \( \mathbb {C}^3 \) with the equation given by \( z_1^p + z_2^q + z_3^r = 1\) [13].

Figure 14
figure 14

The trefoil knot under the z-projection.

In KnotPortal, the trefoil knot is represented through the parametric equations

$$\begin{aligned} \begin{pmatrix} \sin t + 2 * \sin 2t\\ \cos t - 2 * \cos 2t\\ -\sin 3t \end{pmatrix}. \end{aligned}$$

The group multiplication matrix of \( D_3 \) is

$$\begin{aligned} \begin{pmatrix} e &{} a &{} b &{} c &{} d &{} f \\ a &{} e &{} d &{} f &{} b &{} c \\ b &{} f &{} e &{} d &{} c &{} a \\ c &{} d &{} f &{} e &{} a &{} b \\ d &{} c &{} a &{} b &{} f &{} e \\ f &{} b &{} c &{} e &{} a &{} d \end{pmatrix} . \end{aligned}$$

The generator-to-cone map assigns the elements a, b, and c to the three cone segments, respectively.

The relationship between the group and the portals of the trefoil knot is detailed in Figure 15.

Figure 15
figure 15

The relationship between the elements of the symmetry group of the triangle \( D_3 \) and the portals generated by the trefoil knot, after the drawing in [23]. The outer portals correspond to reflections, the inner portal to a rotation.

The Figure-Eight Knot

The presentation of the figure-eight knot (see Figure 16) is \( \left\langle x,y \mid x^{-1}yxy^{-1} = yx^{-1}yx \right\rangle \) [18, p. 58]. Again adding the relations \( x^2 \) and \( y^2 \), one obtains \( \left\langle x,y \mid (xy)^5, x^2, y^2 \right\rangle \), which is again a Coxeter group, namely \( H_2 \), which is of order 10. This knot thus generates 10 worlds.

Figure 16
figure 16

The figure-eight knot under the z-projection.

In the software, it is represented through

$$\begin{aligned} \begin{pmatrix} (2 + \cos 2t) \cos 3t\\ (2 + \cos 2t) \sin 3t\\ \sin 4t \end{pmatrix}. \end{aligned}$$

The group multiplication table is

$$\begin{aligned} \begin{pmatrix} a &{} b &{} c &{} d &{} e &{} f &{} g &{} h &{} i &{} j\\ b &{} a &{} d &{} c &{} f &{} e &{} h &{} g &{} j &{} i\\ c &{} j &{} e &{} b &{} g &{} d &{} i &{} f &{} a &{} h\\ d &{} i &{} f &{} a &{} h &{} c &{} j &{} e &{} b &{} g\\ e &{} h &{} g &{} j &{} i &{} b &{} a &{} d &{} c &{} f\\ f &{} g &{} h &{} i &{} j &{} a &{} b &{} c &{} d &{} e\\ g &{} f &{} i &{} h &{} a &{} j &{} c &{} b &{} e &{} d\\ h &{} e &{} j &{} g &{} b &{} i &{} d &{} a &{} f &{} c\\ i &{} d &{} a &{} f &{} c &{} h &{} e &{} j &{} g &{} b\\ j &{} c &{} b &{} e &{} d &{} g &{} f &{} i &{} h &{} a \end{pmatrix}. \end{aligned}$$

The Solomon’s Seal Knot

The Solomon’s seal knot is the (5, 2)-torus knot. Its parametric equation is thus given by [26]

$$\begin{aligned} \begin{pmatrix} (3 + \cos 5t) \cos 2t\\ (3 + \cos 5t) \sin 2t\\ \sin 5t \end{pmatrix}, \end{aligned}$$

and the presentation of its group is \( \left\langle x,y \mid xyxyxy^{-1}x^{-1}y^{-1}x^{-1}y^{-1}\right\rangle \) [12]. After adding the relations for the generators, the order-two covering group of this knot is thus the same as for the figure-eight knot.

Hopf Link

In the Hopf link (see Figure 17), each of the branching curves gives a generator, and the two commute, so the deck transformation group is \( \left\langle a,b \mid a^2, b^2, (ab)^2 \right\rangle \). This group is a Coxeter group with matrix \( \left( {\begin{matrix} 1&{} 2\\ 2&{} 1 \end{matrix}} \right) \), which is \( \mathbb {Z}_2^2 \), or equivalently, \( A_1^2 \). This results in four worlds and three portals.Footnote 11

Figure 17
figure 17

The Hopf link under the z-projection.