# Generating the set of all three-dimensional binary arrays distinct under rotation and reflection?

How can I automatically generate all possible three-dimensional binary arrays of size $(x_1 \times x_2 \times x_3$) where each array is distinct from all others with respect to rotation and reflection operations around any axis? Is there a straightforward way to do this in Mathematica v9.0?

For three-dimensional arrays, rather than using nested lists, perhaps it would be better to use the form: {{data1, {x1,y1,z1}},{data2, {x2,y2,z2}},{data3, {x3,y3,z3}},...}. So an example of the set of all three-dimensional array of dimensions $(x_1 \times x_2 \times x_3)$, where $x_1 = x_2 = x_3 = 2$ would be:

coordinateArray = Tuples[{0, 1}, 3];
bitArray = Tuples[{0, 1}, 8];

arrayList = Array[{} &, Length[bitArray]];

For[i = 1, i <= Length[bitArray], i++,
arrayList[[i]] = Partition[Riffle[bitArray[[i]], coordinateArray], 2];
];


The set of all such three-dimensional arrays of dimensions $(x_1 \times x_2 \times x_3)$, where $x_1 = x_2 = x_3 = 2$ is given by arrayList of length (here) $2^8 = 256$:

arrayList

{{{0, {0, 0, 0}}, {0, {0, 0, 1}}, {0, {0, 1, 0}}, {0, {0, 1, 1}}, {0, {1, 0, 0}},
{0, {1, 0, 1}}, {0, {1, 1, 0}}, {0, {1, 1, 1}}},
{{0, {0, 0, 0}}, {0, {0, 0, 1}}, {0, {0, 1, 0}}, {0, {0, 1, 1}}, {0, {1, 0, 0}},
{0, {1, 0, 1}}, {0, {1, 1, 0}}, {1, {1, 1, 1}}},
...,
{{1, {0, 0, 0}}, {1, {0, 0, 1}}, {1, {0, 1, 0}}, {1, {0, 1, 1}}, {1, {1, 0, 0}},
{1, {1, 0, 1}}, {1, {1, 1, 0}}, {1, {1, 1, 1}}}}

• @rasher Well, starting in one-dimension, nothing more intelligent than using Tuples to generate a set of all possible arrays, then going through and pruning for reflection. I need the set of all possible such arrays, so its a bit difficult to find a generating function for a code family that does the trick. Mar 4 '14 at 22:42
• @rasher I was hoping for some tools to help with quickly pruning (down to $1$) codes / arrays that can be reflected or rotated on one-another. Mar 4 '14 at 22:45
• Please post an example of a three-dimensional binary array of size (x1 × x2 × x3) Mar 4 '14 at 22:45
• @belisarius Does my example make sense to you? Mar 4 '14 at 23:01
• @belisarius The trouble I'm having is finding a fast way to throw out redundant arrays / codes that are rotationally or reflectionally symmetric to other arrays / codes. Mar 4 '14 at 23:04