Archives

NxNxN cubes in GAP

Since defining GAP definitions for large cube sizes can be very tedious, I have implemented some GAP code for defining NxNxN cubes. The main function is called GenCube and returns a group representing a cube of the size specified by the parameter n. This function has a 2nd parameter (center_ori) used for odd cubes that allows specifying whether or not you wish to have the orientation of the most central pieces on each face to be considered significant.

The code uses a face-based numbering system. The facelets on the U face are numbered 1 to n2, the L face uses numbers n2 + 1 to 2n2, and the remaining faces are similarly numbered in the order F, R, B, D. For handling orientation of the most central pieces on each face, 18 additional numbers are used, starting at 6n2 + 1.