# Finding shared cubes of tesseracs in a 5 dimensional hypercube.

Last week someone posted a question about creating non-euclidian-space dungeons for a roleplaying adventure on reddit. One of the replies was this link to a screengrab of an old 4chan post about creating a 5 dimensional hypercube dungeon. This sounds to me like a most awesome thing to build. A truly exotic and weird roleplaying dungeon/complex. I decided to, at least, construct plain floor plans that simply show how you can traverse this 5 dimensional construct.

After spending a few hours reading up on tesseracs, staring at pictures of tesseracs and talking to a friend about tesseracs I belive I understand how they work. The second part of the 4chan post, where the user talks about a button in each room of a single tesserac, is where I disagree about the implementation.

Each 2D face of a cube shares a 1D intersection with each surrounding face.
Each 3D cube of a tesserac shares a 2D face (or wall) with each adjecent cube.
So I gather each 4D tesserac of a 5-cube shares a 3D cube with an adjecent tesserac.

So if I understand this correctly the following should apply:
A cube of a tesserac shares a face with another cube. If you can walk between cubes (as you can in this dungeon) then the same wall has two different side. You can hang a picture on one wall, walk around to the other side and, even though it's the same wall, there's no picture on the other side.
So in a 5-cube each cube in a tesserac is shared with another tesserac, but they are in effect different sides of the same cube.

When you stand inside a cube you need a way to enter the "other side" of the cube and thus move to another tesserac. Since we traverse the cubes of a tesserac through 2D doorways we thought about placing a 3-dimensional doorway in each room that takes you to the "other side" of the room.

So here's where my problem lies. My understanding of geometry was strained when understanding the 4-cube. When it comes to the 5-cube I'm more than lost.
Labeling each tesserac with a letter from A to J and each room of the tesseracs with a number from 1 to 8 I need to know where the portal in each cube takes you. That is, what's the shared cube? Is there anyone that can help us with this problem?

My friend drew up this tesserac diagram with his amazing paint skills which we belive is correct. We plan to draw 10 of these and note inside each hexagon where the portal takes you. I realize I could just assign this randomly, but then it might not be a correct 5-cube. And gosh darn it, it matters that it is!

-

The 0D corners of a 5-cube can be represented by 5 bit binary words. There are 32 of them. The 1D edges between the corners are then pairs of corners that differ in exactly 1 bit. There are $\frac {32\cdot 5}2=80$ of them, as you can choose any corner, choose one direction to move in (the bit to change) but each edge is counted twice, once from each end. The 2D squares can be found by taking a corner, selecting two bits to change, and changing them to all four possibilities. There are $\frac {32 \cdot 10}4=80$ of them and so on. This gives $10$ 4D tesseract faces and $40$ 3D cells. As each tesseract has $8$ 3D cubical faces, when you enter one you can go straight through or make any of six right-angle turns. There is only one tesseract you can't get to from a given one-the opposite one. Each tesseract face has one coordinate fixed and 16 corners that come from all possibilities of the other four bits. The cells of a tesseract come from fixing one more coordinate. If you think in coordinates like this, you can check the map.