← Iris

Segments 8
Symmetry group D8
Symmetries 16
Strokes 0
Segments
Line thickness 2
Opacity 80%
Color
BG

Dihedral symmetry

A kaleidoscope with n mirror segments implements the dihedral group Dn, the symmetry group of a regular n-gon. This group has 2n elements: n rotations (by multiples of 2π/n) and n reflections. Every stroke you draw is replicated across all 2n symmetries simultaneously.

How it works

Your mouse position is converted to polar coordinates relative to the canvas center. For each of the n segments, the angle is rotated by 2πk/n. Every other segment is reflected (the angle is negated before rotation), producing the full dihedral symmetry. The result: a single freehand stroke becomes a mandala.

Mathematical structure

Dn is generated by two elements: a rotation r by 2π/n and a reflection s. They satisfy rn = s2 = (sr)2 = identity. For n = 6, this is the symmetry of a snowflake. For n = 8, a stop sign. The kaleidoscope makes these abstract group elements tangible.