4 Planar isometries
A direct isometry is a tuple \((c, s, t)\) with \(c, s \in \mathbb {Q}\), \(t \in \mathbb {Q}^2\), and \(c^2 + s^2 = 1\). It acts on \(p \in \mathbb {Q}^2\) by
The action of a direct isometry on \(\mathbb {Q}^2\) is both injective and surjective.
Applying a direct isometry vertex-wise to a convex polygon produces a convex polygon. Convexity is preserved because rotations preserve the cross products witnessing the “strictly left of” condition.
Direct isometries are closed under composition, with \((c, s, t)_1 \circ (c, s, t)_2\) given by the usual product of rotation matrices and composed translation.
For each pair of naturals \((a, b) \ne (0, 0)\), the formulas \(c = (a^2 - b^2)/(a^2 + b^2)\) and \(s = 2ab/(a^2 + b^2)\) yield a rational point on the unit circle. Enumerating such pairs up to a resolution depending on a target maximum angle change yields a finite rational grid on the unit circle.
Every \((c, s)\) produced by angleGrid satisfies \(c^2 + s^2 = 1\).
For a granularity \(\epsilon {\gt} 0\), we form a finite list of direct isometries by pairing each angle from angleGrid with each translation on a rational grid intersected with the LocationRange (Definition 29). The angle resolution is scaled by the distance cutoff so that far-away points are still covered finely.