Hacker News new | ask | show | jobs
by soperj 1392 days ago
How's this a donut and not a sphere?
2 comments

For a sphere, the location of where you land when you go off the screen is a continuous function of where you started from. If two Pac-Men exit the screen next to each other, they will re-enter the screen next to each other.

The real Pac-Man game is a donut because it's discontinuous at the corners. If two Pac-Men are right next to each other near the top-left corner, and one exits via the top and the other exits via the left, they will end up on opposite sides of the map.

There's a mathematical formalization of this, where the thing you look at is closed paths of Pac-Man leaving a point, traveling around, and returning back to that same point. You group such circuits by whether they can be continuously deformed into each other. The discontinuity at the corners makes two distinct families of circuits, which correspond to traveling on a donut around the circumference vs going through the hole.

between your post, and kkwteh's, it makes a lot more sense. Thank you both.
A donut is a way to embed a two-dimensional torus in our three-dimensional space. What we have here is different. It's a visualisation of a three-dimensional torus. On a two-dimensional donut, there are two directions which loop around. In the space shown here, the only difference is that there are three directions.

A three-dimensional sphere also loops around, but it's not quite the same. One way to get the three-dimensional sphere would be to glue each points at the cube boundary to every other point on the boundary. One way to show that this three-dimensional sphere is not the same as the three-dimensional torus is that in the three-dimensional sphere, you could gather up any tied rope by passing it around the cube boundary.