Toratopes are a class of shapes that generalize cubes, cylinders, spheres, and tori into higher dimensions. Cylinders and tori in particular tend to split off into many different types.
Toratopes are commonly represented by toratopic notation, which represents the shape by its formula. The notation uses parenthesis to denote
the square root of a sum of squares (with a radius subtracte4d), while a vertical bar denotes a dimension/axis variable like x, y, z, w, v, etc.
There must always be at least two elements under a pair of parenthesis, so (|), ((||)), etc. are not valid.
For example, ((|||)|) means sqrt((sqrt(x^2 + y^2 + z^2) - r_1)^2 + w^2) - r_2 = r_3
What people commonly miss from this description, though, is that in order for the formula to work properly so that the surface will appear on the graph
where the value equals zero, multiple components at the top level must be put under the maximum function of their absolute values. If the entire thing
is under one top-level pair of parenthesis, this is not necessary, but for example, (||)(|||)| means max(abs(sqrt(x^2 + y^2) - r_1), abs(sqrt(z^2 + w^2 + v^2) - r_2), abs(u)).
If there is a top-level pair of parenthesis, it is a closed toratope. These make spheres and tori. If there are multiple top-level elements, it is an open toratope.
These make cubes and cylinders, and in general the top-level elements just get put into a Cartesian product operation.
Closed toratopes have the very helpful property that they're automatically signed distance fields. This makes raymarching them a breeze, and you can apply operations like union or domain repetition very easily.
If you want to convert slices of them to triangle meshes in real time, the marching cubes algorithm will also work well.
Toratopes in their natural form as defined by equations are always symmetric on every orthogonal plane at the origin.
The number of open or closed toratopes in a given dimension is literally just the number of possible trees you can make with the notation. It follows sequence A000669 on OEIS
The total number of toratopes is double that, since the presence of top-level parentheses is not accounted for by the sequence. The total number of tori (open toratopes other than the sphere) is the sequence number minus 1.
Thus there is 1 torus in 3D, 4 tori in 4D, 11 tori in 5D, 32 tori in 6D, 89 tori in 7D, etc. As you can see, it grows rather fast.
In dimension 1, there is only one toratope: |. It's simply a line segment.
In dimension 2, there are two toratopes, the square || and the circle (||).
In dimension 3, there are four toratopes.
There are five open toratopes in dimension 4.
Four-dimensional space has some weird tori that are nothing short of magic. It has the best selection of them in my opinion; every one is unique, yet all of them are mostly simple and elegant in construction.
First, let's get the hypersphere out of the way because it's the most commonly mentioned shape in all of 4D discourse. Whenever anyone introduces 4D to newcomers, the ubiquitous growing and shrinking sphere explanation is used.
It IS a valid toratope despite being boring, and it's notation is (|||). It is known more concisely as a glome.
Other than that, there are four types of tori:



In 3D, two tori can link.
![]()
This property allows the construction of chains:

And chainmail, which is effectively a dimensional array equivalent to chains:

Can higher-dimensional tori chain the same way? The answer is yes, but it's more complicated.
Not every type of torus can chain with itself, and some types of tori require an alternating pattern to chain.
To understand the situation a bit better, I want to talk about holes.
A standard 3D torus has a hole. Some shapes can have more than one hole, like this:
In 3D, you can stick a rod through it. If the rod is a little smaller than the hole, can't move through it, and must always touch the torus, its only option is to hug the wall.
When it does this, it can still move around in a circle. You can think of this like the "boundary" of the hole.
In 4D, a similar type of hole occurs in the spheritorus, except that an entire plane can hug the wall and move around in a circle.
Since a circle is a wrapped line, its surface has one dimension. I can say that the hole of a 3D torus or a spheritorus both have a 1-dimensional boundary.
(Note: This is non-standard terminology, made to make this article a bit easier to write.)
A torisphere is a bit different. It can only fit a rod, but the rod can move around the surface of a sphere. Since a sphere is a 2-dimensional manifold, I will say
the hole of a torisphere has a 2-dimensional boundary.
A ditorus is even weirder. Ignore the central hole and focus on the hole that goes around in a circle, corresponding to the hole in the cross sections. Again, in 4D this can only fit a rod.
However, this time when the rod hugs the wall, it can move on the surface of a 3D torus, another 2-dimensional manifold. It is a different type of 2-dimensional hole.
The problem with linking two spheritori together is that there is too much space. They will easily fall off each other and unlink.
Meanwhile, two torispheres don't have enough space to link together at all.
So what's the solution? Use one spheritorus and one torisphere. The spheritorus is able to hook into the torisphere, but the extra boundary space of the hole blocks it from falling out. Meanwhile,
the torisphere doesn't run into the same space issue it did before. Turning this into chains and chainmail requires an alternating pattern.
This Desmos 3D graph (quite laggy/RAM-intensive, so beware) illustrates a patch of this alternating chainmail structure that could be draped over a 4D
object. Modify the w variable from about -1 to 1 to see the different slices.
Is there a more general way to check if two holes can link? It's actually quite simple given the definition of an n-dimensional hole earlier.
In dimension D, an N-dimensional hole and an M-dimensional hole can link if N + M = D - 1. That is, holes can link with their opposites.
This also opens up odd dimensions to have more basic links. For example, in 5D, the equivalent of a torisphere (a spheritorisphere) can easily link with itself.
This condition doesn't guarantee a link is possible since there could be an issue with more concrete aspects of the geometry that blocks other things from fitting in with it.
For toratopes though, this is rarely a problem, and you mostly just have to find the right radii that gives enough space.
Are there any other chains in 4D, and are there any less basic 4D toratopes that can link and chain with themselves? The answer to both is yes.
There are 11 5D tori.
glomitorus - A
spheritorisphere - B
toriglome - C
spheritiger - D
toratiger - E
spheriditorus - F
torispheritorus - G
ditorisphere - H
tritorus - I
cylspherintigroid - J
cyltorintigroid - K
A B C D E F G H I J K
A N
B N Y
C Y N N
D N Y Y Y
E Y Y Y Y Y
F N Y Y Y Y Y
G Y N Y Y Y Y Y
H Y Y N Y Y Y N Y
I Y Y Y Y Y Y Y Y Y
J Y N Y Y Y Y Y N Y Y
K Y Y Y Y Y Y Y Y Y Y Y