[Math] the topology of a world with portals

algebraic-topologygeneral-topology

Portal is a video game, where you can create 2 disks $D\in\mathbb{R}^3$, which then are identified. The world is glued together at these points.

enter image description here
(source: thebuzzmedia.com)

This kind of reminds me of some procedures to construct spaces for CW complex and whatnot in algebraic topology. I don't know if that kills properties like smoothness, but that doesn't really matter here.

My question:

What is the topology of a world with one or $n$ portals?

If you take topological $\mathbb{R}^3$ and two or even $2n$ therein seperated two-dimensional discs $D_1,D_2$ which you identify (say pairwise), what is the resulting topology?

enter image description here
(source: ngfiles.com)

The question was motivated by my own answer here.

Best Answer

I will try to answer the question I think you should have asked instead. This should perhaps be a coment instead but it is too long.

Take the union of all the walls in a portal level. This is an orientable two-dimensional manifold $M$. The set of points the player can occupy is some connected component $C$ of the complement of the manifold in $\mathbb R^3$. Let $D$ be the complement of $C$. If we assume there are no "floating walls" in the level, then $M$ is a (connected) orientable compact surface without boundary. Due to the classification of closed surfaces, $M$ has a genus $g\geq 0$, so it is homeomorphic to a sphere with $g$ handles. Identifying two discs on $M$ is equivalent to adding another handle to the surface. You can picture it by just digging a tunnel inside $D$ between the two discs. It will look something like this: triple torus

I got the picture from this Wikipedia page, which has two more representations of the same surface.

Now, it remains to deal with the case of shooting one portal on a wall and another on a floating platform. In this case you can't dig a tunnel inside $D$ between the portals since $D$ is not connected. We could however embed $C\subseteq \mathbb R^3$ in $\mathbb R^4$, and dig a tunnel between the portals inside $\mathbb R^4-C$, but now we have a space embedded in $\mathbb R^4$, which of course more difficult to picture. Thus the general case of a portal level is the union of a finite number of spheres with handles, where portals connecting different wall components are realized by tunnels extending into a fourth dimension. I don't know if there's a simpler way to describe this.

Related Question