3 # In geometry, the tesseract is the four-dimensional analog of the cube; the
4 # tesseract is to the cube as the cube is to the square. Just as the surface of
5 # the cube consists of 6 square faces, the hypersurface of the tesseract
6 # consists of 8 cubical cells.
11 x

, y

, z

, t

= symbols('x y z t')
13 tesseract

= Le(0, x

, 1) & Le(0, y

, 1) & Le(0, z

, 1) & Le(0, t

, 1)
15 def faces(polyhedron

):
16 for points

in polyhedron

.faces():
17 face

= points

[0].aspolyhedron()
18 face

= face

.convex_union(*[point

.aspolyhedron() for point

in points

[1:]])
21 if __name__

== '__main__':
22 print('Faces of tesseract\n\n {}\n\nare:\n'.format(tesseract

))
23 for face

in faces(tesseract

):
24 assert(len(face

.vertices()) == 8)
25 print(' {}'.format(face

))