Compute Distinct Polyomino Variants

**POLYOMINO_MULTIHEDRAL_VARIANTS**,
a MATLAB program which
computes the distinct variants of one or more polyominoes under reflection
and 90 degree rotations.

A polyomino P is a shape formed by connecting unit squares. It can be described by a rectangular binary matrix. The matrix is assumed to be "top-left tight", that is, there must be a 1 in the first row, and in the first column of the matrix, but there may be trailing rows and columns of zeroes.

A polyomino can be rotated by 90, 180, or 270 degrees, and it can be reflected. There are 8 combinations of these transformations possible, so there are 8 variations of a given polyomino. However, because of symmetry, there may be 1, 2, 4, or 8 distinct variations.

This program accepts the binary matrices describing one or more polyominoes, generates all the possible variations, and returns those which are distinct.

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

**polyomino_multihedral_variants** is available in
a MATLAB version.

polyomino_multihedral_variants_test

- pentomino_matrix.m returns a 0/1 matrix defining a particular pentomino.
- polyomino_condense.m, cleans up a matrix that represents a polyomino by setting all nonzero entries to 1, and removing initial and final rows and columns of zeros.
- polyomino_multihedral_variants.m, carries out reflections and rotations of a polyomino to determine which transformations yield distinct variants.
- polyomino_print.m, prints a polyomino.
- polyomino_transform.m, carries out reflections and rotations of a polyomino.
- polyominoes_print.m, prints polyominoes stored in an array.
- timestamp.m, prints the YMDHMS date as a timestamp.