Isometry Discretization #
This file discretizes the space of direct planar isometries for computational purposes.
We might assume that the isometries act on worms containing the origin.
Rational approximation of π (355/113 is accurate to 6 decimal places)
Equations
- Moser.piApprox = 355 / 113
Instances For
Generate rational points on the unit circle,
so that the maximum difference in angle between adjacent points is no more than max_angle_change.
Note: Implementation using the complex squaring trick. For (a, b) we compute (a + bi)² = (a² - b²) + 2abi, then normalize to get:
- cos = (a² - b²) / (a² + b²)
- sin = 2ab / (a² + b²) This gives exact rational (cos, sin) pairs satisfying cos² + sin² = 1.
TODO: Optimize by removing points that are too close together to be unnecessary per the spec.
Equations
- Moser.angleGrid max_angle_change = (Moser.angleGridAux (max 1 (4 / max_angle_change).ceil.toNat)).dedup
Instances For
Discretize the space of planar isometries with given granularity TODO fold into the worm manipulations and optimize more finely.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Discretize with a default epsilon