Presets
Playback
Group
Shapes and optics
Layers
Model check
The science
Mirrors and groups
Two mirrors meeting at the angle pi/n generate the dihedral group Dn with 2n elements: an object between the mirrors is seen 2n times, half of them mirror images. Three mirrors forming a triangle with angles pi/p, pi/q, pi/r where 1/p+1/q+1/r = 1 generate an infinite wallpaper group: (2,4,4) is p4m, (2,3,6) is p6m and (3,3,3) is p3m1. These are the only three triangle groups of the Euclidean plane.
Folding
The reflection in a line with unit normal n through P is x' = x - 2 n.(x - P) n. To fold any point into the chamber, reflect it in every side it is outside of and repeat; this terminates for these groups. Folding never increases distance (it is 1-Lipschitz), which is checked live. Dragging on the canvas folds your pointer into the chamber, so the hero shape follows you in all chambers at once.
Brightness
Each reflection loses a fraction of the light, so an image seen after k bounces has brightness Rk. Parity shading marks chambers reached by an odd number of reflections (mirror images).
Honest simplifications
Images are drawn as exact copies placed by the group elements, not by recursive ray tracing; mirrors are perfect lines and the pattern only closes cleanly for angles pi/n. Other mirror angles give overlapping, inconsistent images in a real tube kaleidoscope. See the 3D companion for the three-mirror spherical version (A3, B3, H3).
Model checks: chamber angle sum, fold properties on 3000 random points, tiling uniqueness, and chamber density against 1/area.