^ ^ ^ ^ =(o.o)= ~byakuren =(o.o)= m m m m
Inspired by Sol LeWitt’s sculptural series exploring all possible variations of an open cube, I wrote a J program to enumerate them computationally.
After watching the first 3 minutes of this video, I thought it would be a fun exercise to calculate all 122 variations programmatically.
A cube has 12 edges. An “incomplete open cube” is a structure made from some subset of these edges that:
Two structures that can be rotated into each other are considered the same. The question: how many unique incomplete open cubes exist?
The cubes are grouped by edge count:
| Edges | Count |
|---|---|
| 12 | 1 |
| 11 | 5 |
| 10 | 13 |
| 9 | 25 |
| 8 | 32 |
| 7 | 24 |
| 6 | 14 |
| 5 | 5 |
| 4 | 3 |
Download: incomplete-open-cubes.ijs
The program represents a cube as a 3x4 matrix of binary bits, where each bit indicates whether an edge is present:
Row 0: Top face edges (4 edges)
Row 1: Vertical edges (4 edges)
Row 2: Bottom face edges (4 edges)
The program implements pitch, roll, and yaw as permutations of the edge indices:
Each cube is rotated through all 64 combinations (4 positions x 4 x 4), and the lexicographically smallest form becomes its canonical representation.
The program generates ASCII art for all 122 cubes, grouped by edge count.
Full output: cubes.txt (ASCII grid of all 122 cubes)
jconsole incomplete-open-cubes.ijsThis generates cubes.txt with all cubes rendered as
ASCII art in a grid format.