README.md
8.1 kB · markdown
Roulette Reaches
- Finds the reaches at which three or four of a wheel's trochoids run through one point on a circle track, and reads them back off
mrlynum::spirograph::pointandmrlynum::spirograph::trace. - The wheel is the level-1 carpet, eight pencils on the filled cells, corner seats at modulus
2 t / 3and edge seats atsqrt(2) t / 3for reacht, on the circle tracka/bin lowest terms, inside or outside. - The reduction: a pencil at complex seat
pwheel radii drawsz(psi) = r e^(i b psi) (A + p e^(i eps a psi))onpsiin[0, 2 pi), withA = abs(a/b + eps),eps = -1inside and+1outside. - The picture turns
afold, sincez(psi + 2 pi / a) = e^(2 pi i b / a) z(psi)with noepsin the factor, and turning the seat byalphaturns the curve by-b eps alpha / a, so every curve of one seat modulus is a rotation of one master curve and the whole picture is one scalar problem. - The mark: writing
xfor the seat's phase,m(x) = 4 a (b eps x / a + arg(A + p e^(ix))) / piwithargcontinuous from0atx = 0; the radius is strictly decreasing on[0, pi], so the curve meets every circle strictly between the two apex radii in exactly2 apoints, at the anglesc + m/8andc - m/8in units of a turn overa, wherec = -b eps arg(p) / (2 pi)is the seat's offset. - The offset of a carpet seat is an exact eighth:
-b eps dmod 8 for the seat's compass indexd, so every meeting test is integer arithmetic on the eighths and never a tolerance. - While the modulus is under
Athe mark runs from0at the outer apex to4 b epsat the inner one; pastAthe pointA + p e^(ix)circles the origin and the inner value becomes4 b eps + 4 ainstead. - The mark is one to one in the radius for modulus under
min(1, A), and that window is sharp but for one endpoint: at modulus one the binding derivative meets its bound at the single phasex = 0inside and atx = pioutside, so modulus one is still one to one, and every larger modulus fails. That window, not modulus under one, is what the node countsa (b - 1)and2 a bneed. - Two curves of one seat modulus whose offsets differ by a quarter turn, which is what a square seat orbit gives, cross only on the circles where the mark is a whole number, and a curve crosses itself only where the mark is a multiple of four; seats a fifth of a turn apart cross where the mark is plus or minus
1.2modulo four instead. - Three curves of one seat modulus never meet at a point unless the modulus is
A, and atAevery curve of that modulus runs through the centre,atimes each; the radius squared is monotone in the phase, which carries this past the one to one window. - An alignment reach is where both marks land on whole numbers at one radius and some eighth class collects three or more branches; the number of meeting classes is
4 / gcd(b, 4), each class holdingapoints. - Two kinds: transversal, where every curve crosses the circle, and tangential, where the edge mark sits at
0or4 b eps, its two branches merged, and the edge curve touches the circle at its own apex while a corner pair crosses there. Inside the window the corner band contains the edge band, so both apex radii are reachable and the tangential family is not empty. - The exact law a meeting obeys is
w^(a + 2 b eps) (A + p w)^a = i^m (A w + p)^aon the unit circle, fromabs(A + p w)^2 = (A + p w)(A w + p) / w; squaring loses half the angle, so the law pins the mark modulo four and the solver's walk pins the rest. - The meeting conditions are that law for each of the two moduli plus the equal radius equation, three real equations in three real unknowns over the field generated by
sqrt 2. The alignment reaches are contained in that real algebraic set and do not fill it, since the law pins the mark only modulo four; the mod four branches are disjoint and closed inside the window, so an isolated alignment reach would be an isolated point of the set and hence algebraic. Nothing here certifies any reach isolated, so no reach is certified algebraic. - The solver walks the reach: it fixes each whole corner mark, samples the reach on a grid, and bisects the cells where the edge mark steps over a whole number. The edge mark is read through the clamped phase, so it stays continuous where the corner mark's radius leaves the edge band and the last cell before the exit is searched like any other; the band exit itself is bisected separately as the tangential event.
- The scan runs over the window, from the reach floor
mrlynum::spirograph::pencilsaccepts up tomin(1.4999, 1.5 min(1, A)), and prints the corner modulus at both ends. - The proximity check is the falsification: the predicted point is computed from the algebra alone, then the least distance from it to each pencil's polyline is measured, in f64 against
mrlynum::spirograph::pointand in f32 againstmrlynum::spirograph::trace, at growing sample counts.tracereturnsf32, so the study prints half an f32 step at the meeting radius beside every f32 gap; a gap under that floor measures rounding, not convergence.
RUN
CARGO_BUILD_JOBS=4 cargo run --release -p roulette-reaches- A few minutes; prints only, writes nothing, holds a few megabytes.
WITNESSES
- The seat rotation sign, settled against
mrlynum::spirograph::pointon7/3inside atalpha = 0.3: the curve turns by-b eps alpha / a, which closes to3.691e-15at three phases, while+b eps alpha / amisses by8.866e-1. - The reduction against
mrlynum::spirograph::pointover all 98 circle tracks withbin1..8andainb+1..13coprime, both sides, at reach0.83and 29 phases a seat: worst gap2.138e-13; the offset classes matchmrlynum::spirograph::distincton all 98. - The node window:
7/5inside at modulus0.3900underA = 0.4givesb - 1 = 4self classes and2 b = 10pair classes per pair, and at0.4100the pair count falls to8;4/3inside at0.3267gives2self classes and at0.3400gives1. - The
7/3inside carpet has 24 alignment reaches over the scan, which on the corner seats runs from modulus0.033333to0.999933: 21 transversal and 3 tangential. Every transversal meeting carries four branches, twelve of the 21 from four distinct curves and nine from three, where one curve's own self crossing lands on the meeting. - The transversal reach near
0.79is0.791009415157, marks(-6, -9), ring1.005704332357wheel radii, corner modulus0.527339610104; the exact law residual is4.18e-15and the bracket1.1e-16. - The f64 check at that reach: the four meeting seats sit
2.167e-5,1.441e-6,7.697e-8,5.590e-9from the predicted point at 2000, 8000, 32000 and 128000 samples, falling like the square of the sample count, while the other four seats stay1.206e-1away. - The same read off
tracegives2.162e-5,1.526e-6,1.109e-7and then floors at7.926e-8; half an f32 step at that radius is1.192e-7, so only the first two columns carry the square law. - The control reaches
0.781009and0.801009carry no class past two branches and push the four seats1.767e-2and1.771e-2from that point. - The drop, in classes times
a:7/3inside carries 184 classes and so 1288 nodes at a generic reach, and 164 classes and 1148 nodes at the alignment, each meeting swallowing five double points. - The tangential family on
7/3inside sits at0.687455178256with marks(-7, -12),0.948942238176with(-1, 0)and1.176138007019with(-5, -12); three seats pass within1.142e-6,1.707e-6and3.654e-8of the predicted point in f64 at 8000 samples while the nearest other seat is5.733e-2,4.789e-1and5.492e-2away. - The sweep over all 98 tracks inside the window: 2157 alignment reaches, 193 of them tangential; every one is read against
pointandtraceand holds, the 1964 transversal ones also show a class past two branches in the census, and no control reach shows one. The worst f64 gap over the whole sweep is2.445e-4, over an f32 floor of at most9.537e-7. - The counts converge in the scan:
7/3inside gives 24,12/7inside 153,13/7inside 177,9/5inside 89,13/8inside 11 and13/7outside 61, each at both 6000 and 24000 steps.