Abstract 1 Introduction 2 Software References

Interactive Visualization and Verification Tools for Tesseract Path Unfoldings

Soham Samanta Greater Commonwealth Virtual School, Medford, MA, USA    Hugo A. Akitaya ORCID University of Massachusetts Lowell, MA, USA    Erik Demaine ORCID MIT CSAIL, Cambridge, MA, USA    Martin Demaine ORCID MIT CSAIL, Cambridge, MA, USA
Abstract

This paper introduces interactive software tools for studying 2-face path unfoldings of the tesseract (4D hypercube). We present: (1) an algorithm to verify whether a given 24-omino is a valid path unfolding of the tesseract, (2) a web-based visualization tool for exploring and animating unfolding sequences with smooth 3D interpolation, and (3) a design interface integrated with SVG Painter, with a similar design to Demaine’s SVG Painter [3], to create custom unfoldings. We demonstrate these tools by designing a geometric font of 36 path unfoldings resembling Latin letters and digits, illustrating the rich diversity and accessibility of tesseract geometry.

Keywords and phrases:
unfolding, polyominoes, tesseract, path unfolding, visualization
Category:
Media Exposition
Funding:
Hugo A. Akitaya: Supported by the NSF award CCF-2348067.
Copyright and License:
[Uncaptioned image] © Soham Samanta, Hugo A. Akitaya, Erik Demaine, and Martin Demaine; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Computational geometry
Editors:
Hee-Kap Ahn, Michael Hoffmann, and Amir Nayyeri

1 Introduction

Unfolding polyhedra is a classical problem in discrete and computational geometry [4]. In the traditional edge unfolding problem, we cut a subset of edges of a given polyhedron and unfold its surface so that the faces remain connected and lie flat in the plane without overlap. A natural extension to higher dimensions is ridge unfolding: cut the (d2)-dimensional faces (ridges) of a d-dimensional polytope and lay down the (d1)-dimensional faces (facets) flat in the plane. Turney [8] showed that there are exactly 261 polycube unfoldings of the tesseract (4D hypercube), and Diaz and O’Rourke [5] investigated the 2D polyomino unfoldings derived from these 3D unfoldings.

Recently, Akitaya and Kandarpa [1] introduced 2-face unfoldings, which unfolds the 2-skeleton of a polytope directly to 2D. The 2-skeleton consists of all 2-dimensional faces glued together at their shared edges. A 2-face unfolding cuts some of these shared edges so that the 2-skeleton unfolds to a connected, nonoverlapping 2D polyomino. For the tesseract, all 24 square faces appear exactly once, yielding a 24-omino.

In this paper, we focus on path unfoldings where the dual graph forms a Hamiltonian path through the 24 square faces. These have the maximum possible diameter in the dual graph. The tesseract has eight 3D cube faces, including four pairs of opposite cubes that share no square face. We call one such opposite pair the top and bottom cubes. The twelve remaining square faces form the side faces connecting top and bottom. In prior work [2, 7], a subset of the authors studied alternating path unfoldings – those that visit top and bottom cubes alternately (six times each) with a side face visit in between – and enumerated all 35,520 such unfoldings.

However, working with tesseract unfoldings presents significant challenges: understanding the 4D geometry requires substantial mental effort, verifying whether a proposed polyomino can fold into the tesseract is non-trivial, and designing specific unfolding shapes requires iterative trial and error. These difficulties motivated the development of computational tools to make tesseract unfoldings more accessible to researchers.

Contribution.

This paper introduces software tools to facilitate research on tesseract path unfoldings: (1) A verification algorithm that checks whether a given 24-omino is a valid path unfolding using recursive backtracking; (2) A web-based visualization tool that renders unfoldings and animates folding sequences with smooth 3D interpolation; (3) An integrated design workflow combining SVG Painter with our verification tool for rapid prototyping.

2 Software

Tesseract Structure.

Figure 1: Naming convention for vertices. Top cube: ABCDabcd; bottom cube: EFGHefgh; side faces connect them.

We label the top cube as ABCDabcd and the bottom cube as EFGHefgh. The twelve side faces connect the top and bottom cubes. This labeling convention is used throughout our visualization tool, as in Figure 1.

Path Unfolding Checker.

We developed a verification algorithm that determines whether a given 24-omino can be folded into the 2-skeleton of the tesseract via a Hamiltonian path. The algorithm uses recursive backtracking to simultaneously: traverse a potential Hamiltonian path in the dual graph of the input polyomino, walk through the face-adjacency graph of the tesseract, and verify that adjacencies in the polyomino correspond to valid face adjacencies in the tesseract.

The algorithm maintains a partial mapping from polyomino squares to tesseract faces. At each step, it selects an unmapped square adjacent to the current path endpoint, tries assigning it to each tesseract face that could validly extend the path, and recursively attempts to complete the mapping or backtracks if no valid completion exists.

Complexity. The search space is bounded by the number of tesseract faces (24) times the branching factor at each step, which is at most the degree in the face-adjacency graph of the tesseract (at most 4 neighbors per square face). In the worst case (an invalid input requiring full exploration), the algorithm explores O(424) partial assignments, though in practice aggressive pruning via adjacency constraints reduces this dramatically. On all inputs tested, including invalid 24-ominoes, verification completes in well under one second in a browser environment.

Visualization Tool.

Refer to caption
Figure 2: Web-based visualization tool interface showing the 24-omino with face labels and animation controls.

Our web-based visualization tool provides an interactive interface for exploring tesseract path unfoldings. Built using HTML5 Canvas and Three.js, the tool features: face labeling, color schemes highlighting cube structure, dual path visualization, export options, interactive zoom/pan controls, and 3D folding animation.

Animation Mathematics.

The visualization animates how the flat 24-omino folds into the tesseract’s 2-skeleton using smooth interpolation between the 2D unfolding (source) and 3D tesseract projection (destination).

Smoothstep Interpolation. For visually pleasing animations with smooth acceleration and deceleration, we use Perlin’s smoothstep function [6]. Given linear time parameter t[0,1], we compute smoothed parameter s(t)=6t515t4+10t3. This quintic polynomial satisfies s(0)=0, s(1)=1, with s(0)=s(1)=0 and s′′(0)=s′′(1)=0, creating smooth ease-in/ease-out.

Position and Vertex Interpolation. For each face i, we compute source position 𝐩src (center in flat unfolding) and destination position 𝐩dst (center in tesseract projection). The animated center position is 𝐩(t)=𝐩src+(𝐩dst𝐩src)s(t). Each vertex j similarly interpolates: 𝐯j(t)=𝐯src,j+(𝐯dst,j𝐯src,j)s(t), morphing the square from flat to its 3D orientation.

Rotation and Projection. The tesseract projection is interactively rotatable via mouse drag. We apply rotation matrices: first y-axis rotation by θy, then x-axis rotation by θx:

Ry(θy)=(cosθy0sinθy010sinθy0cosθy),Rx(θx)=(1000cosθxsinθx0sinθxcosθx) (1)

We use orthographic projection (discarding z after transformations) to preserve parallel lines and geometric relationships, avoiding perspective distortion.

The animation sequence proceeds face-by-face: each face turns white, interpolates from flat position to tesseract over t[0,1], then joins the tesseract structure. Animation speed is user-controllable, and the tesseract can be rotated during animation.

Design Workflow.

To create custom path unfoldings, we developed an integrated workflow: (1) Sketch 24-omino in SVG Painter in our format. (2) Verify using our checker algorithm; (3) Iterate if invalid; (4) Visualize and animate the valid unfolding.

We created our FONT using this method, which can be seen below.

Figure 3: Tesseract font. Each letter/digit is represented by a path 2-face unfolding of the tesseract.

References

  • [1] Hugo A. Akitaya and Nithish V. Kandarpa. Unfolding skeletons. In Proc. 24th Japan Conference on Discrete and Computational Geometry, Graphs, and Games (JCDCGGG), 2022.
  • [2] Hugo A. Akitaya and Soham Samanta. Path-unfolding the tesseract. In Proc. 31st Fall Workshop on Computational Geometry, 2024.
  • [3] Erik D. Demaine. SVG Painter. URL: https://erikdemaine.org/svgpainter/.
  • [4] Erik D. Demaine and Joseph O’Rourke. Geometric Folding Algorithms: Linkages, Origami, Polyhedra. Cambridge University Press, 2007.
  • [5] Giovanna Diaz and Joseph O’Rourke. Hypercube unfoldings that tile 3 and 2, 2015. arXiv:1512.02086.
  • [6] Ken Perlin. Improving noise. ACM Transactions on Graphics, 21(3):681–682, July 2002. doi:10.1145/566654.566636.
  • [7] Soham Samanta, Hugo Akitaya, Erik Demaine, and Martin Demaine. 2-face path unfolding the tesseract into a font. In Proc. 32nd Fall Workshop on Computational Geometry, 2025. To appear.
  • [8] Peter D. Turney. Unfolding the tesseract. Journal of Recreational Mathematics, 17(1):1–16, 1984.