Incomplete Open Cubes

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.

The Problem

A cube has 12 edges. An “incomplete open cube” is a structure made from some subset of these edges that:

  1. Is connected - all edges form a single connected structure
  2. Is three-dimensional - has extent in all three axes (x, y, z)
  3. Is incomplete - has fewer than 12 edges (otherwise it’s just a complete cube)

Two structures that can be rotated into each other are considered the same. The question: how many unique incomplete open cubes exist?

The Answer: 122

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

How It Works

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)

Key Steps

  1. Generate all possibilities - All 2^12 = 4096 possible edge combinations
  2. Filter for connectivity - Use a graph traversal to ensure all present edges connect
  3. Filter for 3D extent - Check that edges span all three dimensions
  4. Eliminate rotational duplicates - Generate all 64 rotations of each cube, pick a canonical form

Rotations

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.

Output

The program generates ASCII art for all 122 cubes, grouped by edge count.

Full output: cubes.txt (ASCII grid of all 122 cubes)

Running It

jconsole incomplete-open-cubes.ijs

This generates cubes.txt with all cubes rendered as ASCII art in a grid format.