Math
Wallpaper groups and Penrose
The seventeen wallpaper groups, each built from one or two generators and applied to a motif you drag; mirrored copies in a second colour, so rotations, reflections and glides can be told apart by eye. The group's order, its rotations and its mirrors read off the elements, not off the name. And the eighteenth pattern - Penrose rhombi - with thick and thin counts walking to the golden ratio.

What happens
A wallpaper is a pattern that can be slid onto itself along a lattice, and perhaps turned, reflected, or reflected-and-slid. There are exactly seventeen ways to combine those in the plane, and this module builds each group from its generators and stamps one motif through it. The motif is asymmetric on purpose: its copies show where the mirrors and rotation centres are, and whether the glides are true glides. Two groups with the same rotations differ only in where their mirrors run - p3m1 and p31m - and the stabiliser of one point tells them apart. Pick a group, count the copies in a cell, and find the mirrors.
Equations used in the module
Equations element (M, t): M an integer 2×2 matrix, t a translation mod the lattice group = closure of the generators; orders of p1 … p6m: 1, 2, 2, 2, 2, 4, 4, 4, 4, 6, 8, 8, 8, 12, 3, 6, 12 mirror: det M = −1 with (I + M)(t + n) in 2Z² for some integer n p3m1 vs p31m: the stabiliser of (1/3, 2/3) has order 6 vs 3


