Pattern Geometry