The Miracle Octad Generator (MOG) introduced by R. T. Curtis in 1976 is a central tool in the study of sporadic groups, error-correcting codes, Steiner systems, and sphere-packings.
The MOG is basically a single diagram. See e.g.
- http://finitegeometry.org/sc/24/MOG_files/ConwaySloaneMOG.jpg
- http://finitegeometry.org/sc/24/MOG.html
- http://finitegeometry.org/sc/24/mogdefs.html
for versions of the MOG and
- "The Most Powerful Diagram in Mathematics" https://www.youtube.com/watch?v=4xnRZqD7rAo for an incredibly enthusiastic introduction.
Your task is to output the MOG in ASCII form.
One possible version of the required output is the following. This was generated by the method described at http://finitegeometry.org/sc/24/gentheog2.pdf (but with the 2x4 and 4x4 blocks together instead of separated).
X- X-O+
X- X-O+
X- X-O+
X- X-O+
X- X-O+
-X -X+O
X- X-O+
-X -X+O
X- X-O+
-X -X+O
-X -X+O
X- X-O+
XX XXOO
-- --++
-- --++
XX XXOO
X- X-O+
X- X-O+
-X -X+O
-X -X+O
XX XXOO
-- --++
XX XXOO
-- --++
XX XXOO
XX XXOO
-- --++
-- --++
-X XXXX
X- ----
X- OOOO
X- ++++
-- XOXO
XX XOXO
X- -+-+
-X -+-+
-- X+X+
-X O-O-
XX X+X+
X- O-O-
-X X+X+
-X +X+X
-- O-O-
XX -O-O
-- X-X-
X- +O+O
-X +O+O
XX X-X-
-X XOXO
-- -+-+
XX +-+-
-X OXOX
-X X-X-
XX O+O+
-X -X-X
-- +O+O
X- XX--
-X --XX
X- OO++
X- ++OO
X- XO-+
-X XO-+
-- -+XO
XX -+XO
X- X+-O
-- O-+X
-X X+-O
XX O-+X
XX X+-O
-- +XO-
-X O-+X
-X -OX+
XX X--X
X- +OO+
-X +OO+
-- X--X
XX XO-+
X- -+XO
X- +-OX
-- OX+-
X- X--X
XX O++O
X- -XX-
-- +OO+
X- XXOO
X- --++
-X OOXX
X- ++--
XX XOOX
-- XOOX
X- -++-
-X -++-
X- X+O-
XX O-X+
-X X+O-
-- O-X+
XX X+O-
-- +X-O
X- O-X+
X- -O+X
X- X-O+
XX +O-X
-- +O-X
-X X-O+
X- XOOX
-- -++-
XX +--+
X- OXXO
XX X-O+
-X O+X-
-- -X+O
-X +O-X
X- XX++
X- --OO
X- OO--
-X ++XX
X- XO+-
-X XO+-
XX -+OX
-- -+OX
XX X++X
-X O--O
-- X++X
X- O--O
X- X++X
X- +XX+
-- O--O
XX -OO-
X- X-+O
-- +OX-
XX +OX-
-X X-+O
XX XO+-
-X -+OX
-X +-XO
-- OX-+
XX X-+O
X- O+-X
-- -XO+
X- +OX-
Details
The output should consist of 35 6-by-4 rectangles of symbols, each split horizontally into a 2-by-4 rectangle (the brick) and a 4-by-4 square (the square), separated by a single vertical column of spaces, as above. The 35 rectangles themselves should be separated by single blank lines. Trailing spaces and up to one trailing blank line are allowed.
Each brick and square is solidly packed with symbols. You can choose any 2 consistent printable non-whitespace ASCII characters for the symbols that appear in the bricks (X
,-
here) and any 4 printable non-whitespace characters for the squares (X
,-
,+
,O
here). The 2 characters can be a subset of the 4 characters (as here), or not.
Symbols like those above that look nice and are easy to distinguish at a glance are encouraged but not required.
The symbols represent a partition of the brick and a partition of the square (both into sets of size 4). Within each brick you can optionally exchange the roles of the 2 symbols, and within each square you can permute the 4 symbols. Otherwise, each 6-by-4 rectangle should exactly match exactly one of those listed above. Permuting the locations within the brick and square is not allowed.
The 35 6-by-4 rectangles can appear in any order. The pairing between bricks and squares cannot be changed.
The output should not be transposed or otherwise reshaped.
Nothing else should be output, and the code should not throw errors.
It is not required (or allowed) to arrange the rectangles in a 5x7 array, or output the additional "key" rectangle included in some published versions, or draw fancy boxes, etc. (But non-competing answers that do such things might be of independent interest).
Brute-force algorithms that would never finish in practice are allowed, but sensibly efficient algorithms may be more interesting.
As an alternative to printing the output, it is acceptable to output a string including newlines.
This is code-golf, so shortest solution in each language wins.
ascii-art
\$\endgroup\$