

The spirograph
A design is a digit pattern on the unit square at one base and level, the carpet being the base-3 pattern with the centre cell void. Take the design as the wheel and its cells as the holes: a pencil sits at every cell centre, at a seat p measured in wheel radii from the wheel's centre, and the wheel rolls without slipping on a straight line, inside or outside a circle of ratio R/r = a/b in lowest terms, or around a regular polygon. The wheel's turn is its centre's path length over its radius, so a pencil at s of path length sits at c(s) + r p e^(-+ i s/r) and draws a trochoid; the roulette is the set of those curves and k is the number of distinct ones. Everything below is a law about the roulette on a circle track, and the design enters every one of them only through k.
Every claim carries a tag. Proved means a proof is given here or restated from one given here. Verified means recomputed from scratch by a crate test or by the lab study named. Conjecture means checked on a finite domain with no derivation. Refuted means killed, with the witness beside it. The generators are mrlynum::spirograph in ../crates - pencils, track, point, trace, representatives, distinct, nodes, signed_area, disc and cover - and the four studies lab/rs/roulette-nodes, lab/rs/roulette-loops, lab/rs/roulette-reaches and lab/rs/roulette-cover. The spirograph demo rolls any design on any of the three tracks and prints the coincidence law, the node count and the cover as it draws.
One sign and two constants run through every section. Write s = -1 inside the circle and s = +1 outside, M = a + s b, which is a - b inside and a + b outside, and A = M/b for the radius of the wheel centre's own circular path in wheel radii; lab/rs/roulette-reaches writes eps for the same sign. A seat's modulus abs(p) is its reach.
The coincidence law
Two pencils on a circle track a/b in lowest terms draw one curve if and only if a rotation of 2 pi/b about the wheel's centre carries one seat to the other. Proved. One direction is the parametrisation: turning a seat by 2 pi/b shifts the closing parameter by one wheel turn and returns the same point set. The converse is read off the radius, abs(z)^2 = A^2 + abs(p)^2 + 2 A abs(p) cos(a u - arg p) in wheel radii, whose phase runs over a full turns: two seats give one curve only if they share a modulus and their arguments differ by a rotation the parametrisation already supplies, and on the square lattice of cell centres the cut is Niven's, since the only rotations carrying the lattice to itself are the multiples of a quarter turn (Niven's theorem). The rotations of 2 pi/b that are also lattice rotations form the cyclic group of order gcd(b, 4), so curves coincide by half turns when b is even and by quarter turns when 4 divides b, and never when b is odd.
The distinct-curve count k is therefore the pencil set modulo the rotations of order gcd(b, 4). Proved, and Verified by mrlynum::spirograph::representatives and its tests, and against the seat-offset classes of the reduction below on all 98 circle tracks with b from 1 to 8 and a from b + 1 to 13 coprime, both sides (lab/rs/roulette-reaches). The carpet's eight fill pencils give k = 8 inside 7/3, k = 4 inside 5/2 and k = 2 on a track with 4 | b.
The other two tracks are not the same statement, and the crate says so where it counts them. On a line track two seats of one radius draw translates of one shape and never one curve. Proved: turning a seat by gamma slides its whole ribbon gamma wheel radii along the line while the ribbon's period is one full turn of the wheel, so the two curves share no point unless the seats are equal; representatives counts shapes up to a shift there, not curves. On a polygon track every pencil is its own class, and so is every pencil under jitter.
The count is what the rest of the page is about, because every law below is a law about distinct curves. The cover reads the distinct curves and not the pencils. Verified (lab/rs/roulette-cover): two half-turn copies of one seat inside 5/2 are one curve and wall off 0.213852 of the disc, the single pencil's own figure, while inside 7/3 the same two seats are two curves and wall off 0.443227.
The nodes
Two pencils meet where z_p(u) = z_p'(v); writing x for half the difference of the two parameters, taking moduli kills the half sum and leaves one real equation in x alone, and every root of it carries exactly a half sums, because the picture turns a fold. So a node count is the root count of one equation in one variable, never a reading off a picture. For one curve against itself that equation is A abs(sin(b x)) = abs(p) abs(sin(M x)) in wheel radii.
The window is three hypotheses and not one. Every seat must obey 0 < abs(p) < min(1, A): abs(p) > 0 because a seat at the wheel's centre draws the centre circle b times over and crosses nothing; abs(p) < 1, the loop threshold, past which the curve loops; and abs(p) < A, the seat threshold, where the seat reaches the centre path, which comes before the loop threshold on every inside track with a < 2b and never bites outside.
Inside that window one curve crosses itself exactly a(b - 1) times. Proved (lab/rs/roulette-nodes, mrlynum::spirograph::nodes). The equation is the zero set of the imaginary parts of A e^(i b x) -+ abs(p) e^(i M x), whose arguments climb strictly exactly when A > abs(p) and A b > abs(p) M, which is the window; each argument then climbs by 2 pi b over a period, so each branch takes exactly 2b zeros, and with abs(p) > 0 the two branches share only x = 0 and x = pi, since gcd(b, M) = gcd(a, b) = 1.
Two distinct curves of one wheel cross exactly 2ab times when both seats lie in the window and share a radius. Proved, by the same count with a phase added, which shifts the cosine and leaves the turning rate alone. For seats of different radii the same count follows from the sufficient bound 2 A sqrt(1 - abs(p) abs(p')) > abs(p) + abs(p'), which is far from necessary: inside 7/3 at seats 0.950 and 0.672 it reads 1.604 against 1.622 and fails, while the count is 42. Proved.
A whole design therefore carries one node count, 2ab C(k, 2) + k a(b - 1). Verified (lab/rs/roulette-nodes): 5553 cells and 4455175 crossings over both tracks, every a/b in lowest terms with a at most 20 and b at most 10, four designs and seven reaches inside the window, every count three sample counts alike; 143 cells are aligned and printed, 26 need a further doubling, none goes unsettled, and two disagree by a few crossings at a near tangency, inside 20/3 at seat 0.250 and outside 10/9 at 0.400, both reading the law at their base sample count and both read as the law by the torus reduction. The carpet's eight fills inside 7/3 give 1176 + 112 = 1288 at every reach from 0.2 to 1.2.
The law runs live and is pinned there. The spirograph demo prints nodes N = 2ab C(k,2) + k a(b-1) beside the coincidence line and reads the carpet's fills as 1288 inside 7/3, 98 inside 7/4 and 150 outside 5/8, and prints no count at all when a seat leaves the window; the same three numbers are host-checked against mrlynum::spirograph::nodes. Verified.
The window is min(1, A) and not the loop threshold alone. Verified (lab/rs/roulette-reaches). The radius and mark census gives 7/5 inside, whose A = 0.4, ten pair classes per pair at modulus 0.3900 and eight at 0.4100, so 56 crossings for a pair rather than 2ab = 70; and 4/3 inside two self classes at 0.3267 and one at 0.3400, so 4 self crossings rather than a(b - 1) = 8. Both moduli sit well under the loop threshold one.
The threshold the folklore names is the wrong one. Refuted (lab/rs/roulette-nodes). Past the seat threshold the self count falls in steps, each step the loss of one hump of R(x) = abs(sin(b x))/abs(sin(M x)) under the level abs(p)/A, so the self law survives up to the crest, the least local maximum of R, which is never below 1 because R reaches 1 at the midpoint of any two consecutive zeros of sin(b x). Over 213 cells and the 31 inside ratios with a < 2b and a at most 20, every count below the crest is a(b - 1), every count above it is smaller, always a multiple of a, never rising, and every ladder ends at a(a - b). The pair law is not so patient: inside 7/4 at seats 0.900 and 0.636 the pair count is 42 against 2ab = 56 while both self counts still hold at 21 and the crest 1.333 is not yet reached. At exactly abs(p) = A the curve runs through the centre and a branches meet there, so the counts 25 at 7/5 and 31 at 7/6 are neither the law nor a multiple of a.
The regions
A roulette cuts the plane into nodes + 2 regions, the unbounded one among them, at a generic reach with every seat in the window, nodes counting distinct transversal double points. Verified (lab/rs/roulette-nodes, mrlynum::spirograph::nodes). The picture is a connected 4-regular plane graph - connected because every two curves cross, 2ab > 0, and 4-regular because every node is a transversal double point - so Euler gives the count outright; at k = 1 with b = 1 there is no node at all and the 2 regions are Jordan's rather than Euler's. Where branches crowd one point the graph is not 4-regular and the count is branches - points + 2, which is the same number wherever nothing is crowded. A flood of the rastered walls at 1600 and at 2400 pixels returns 2, 7, 16, 8 and 32 for one seat inside 3/1, 5/2 and 7/3 and two seats inside 3/1 and 5/2, and 1206 for the carpet inside 7/3 at the alignment reach below, where 1288 crossings sit at 1148 nodes carrying 2352 branches.
Past the seat threshold the flood tracks the counted crossings and never the law: inside 7/4 at seats 0.900 and 0.636 it counts 84 crossings and floods 86 regions, where the law would say 98 and 100. Verified, same study.
The staircase
Above the loop threshold the curve loops and the node law ends, and what replaces it is an exact staircase in the reach. Put m = a + 2 s b; the unordered pair {a, abs(m)} is {M + b, abs(M - b)}. With sigma and delta the half sum and half difference of the two parameters, z(phi) = z(psi) reads A sin(b delta) = e abs(p) sin(M delta) with e plus or minus one and sigma a multiple of pi/a - the same one-variable equation the node count reads, now read over the whole reach axis. Proved (lab/rs/roulette-loops).
Every self crossing lies on one of the a lines through the centre carrying the seat's own axis. Proved. The reflection in the line of angle b sigma fixes the crossing; for a real seat those lines are k pi/a, and a seat at angle alpha turns the whole curve by -s b alpha/a and turns its lines with it, so the bare k pi/a needs the seat hypothesis. Read off mrlynum::spirograph::trace at 24001 samples over 30 cells at seat angles 0 and 0.3, the worst distance from a crossing to its line is 4.33e-7 of the frame, the floor being the f32 the trace returns. Not every line has to carry one: 4/1 outside puts all four crossings on two of its four lines.
The count changes only where that equation has a double root, and the double roots are the roots of a sin(m delta) = m sin(a delta), equivalently sinc(m delta) = sinc(a delta), each carrying the reach abs(cos(b delta)/cos(M delta)). Proved. A threshold is a tangency angle delta in [0, pi) and not a reach: several angles can share one reach, and then the step there is a multiple of a. The two ends delta = 0 and delta = pi solve the crossing equation at every reach, and a root is born at each as the reach passes one, the derivatives there being A b (1 - e abs(p)) and A b ((-1)^b - e abs(p) (-1)^M); the single entry at delta = 0 stands for both births, which is why the jump at reach one is a and not a/2. Proved: 3/1 inside has no root in (0, pi) at reach 0.98 and two at reach 1.02, at 0.1984 and 2.9432, count three.
For a reach that is positive, not a tangency reach, not M/b, and with m nonzero, the self crossing count of a trochoid on a circle track a/b is a(b - 1) + a sign(m) t, with t the number of tangency angles whose reach is strictly below, counted with multiplicity. Verified (lab/rs/roulette-loops). It runs from a(b - 1) to a(M - 1), and the number of angles in [0, pi), counting delta = 0, is abs(M - b), the same integer as the smaller of abs(m) and a. The census holds on 179 coprime fractions a/b with a at most 24, 357 cases over the two sides with m nonzero, against the crossing equation's root count at the midpoint of every step, and on 25578 reads of mrlynum::spirograph::trace at 4001 and 12001 samples over reach 0.5 to 4 in 203 steps, with no disagreement and every jump bracket 0.0173 wide or less.
On a tangency reach the curve touches itself. Proved. The two branches meet with equal tangents, a tacnode, so the meeting count there is the transversal count just below plus a/2 for each tangency angle at that reach, and the step function is read on the open intervals between tangency reaches and never on one. At reach squared 27/2 the hypotrochoid 5/1 has two tangency angles and two simple roots, so ten meetings against five below and fifteen above, the branches closing to 8.88e-16 at radius 2.041241; 7/2 inside reads 21 against 14 and 28, 11/4 inside 55 against 44 and 66, 3/1 outside 6 against 3 and 9. Verified, same study.
Every tangency reach is an algebraic number in closed form. Proved. Expanding sin(k delta) and cos(k delta) in u = sin^2(delta) by the integer recursion of Sakhnovich 2023, theorems 2.1 and 2.5, turns the tangency equation into u Q(u) = 0, times cos(delta) when a is even, for an explicit integer polynomial Q, and the reach squared into T(u)/B(u) for explicit integer polynomials T and B; the recursion is the cited source's and Q, T and B are this study's. Verified: the hypotrochoid 5/1 has reaches 1 and 3.674234614175 twice, the second exactly reach squared 27/2 at u = 5/6 on Q(u) = 40 - 48 u, and counts 0, 5, 15; 7/2 inside has 1 and 2.353415666603 twice, reach squared (81 + 21 sqrt 21)/32 at the smaller root of Q(u) = 192 u^2 - 336 u + 140, and counts 7, 14, 28; the epitrochoid 5/1 has 1, 4.180967894379 twice and 5.789603394549 twice, reach squared (102 -+ 7 sqrt 21)/4 on Q(u) = -320 u^2 + 448 u - 140, and counts 0, 5, 15, 25, four values for three distinct reaches because two angles share each of the last two.
The tangency equation integrates, so the threshold count is a sign count and carries no numerics at all. Proved. a sin(m delta) - m sin(a delta) is 2 a m times W(delta) = int_0^delta sin(b t) sin(M t) dt up to sign; W' vanishes on (0, pi) only at j pi/M and k pi/b, and there W is exactly (-1)^(j+1) sin(b j pi/M) M/(M^2 - b^2) and (-1)^k sin(M k pi/b) b/(M^2 - b^2), so the count is a sign count over a merged Farey sequence. Verified: the exact integer sign count returns abs(M - b) on all 29450 coprime frequency pairs b and M up to 220, with no root finding anywhere in the computation.
Swapping the wheel frequency b and the rim frequency M fixes every tangency angle and inverts every tangency reach. Proved, because {a, abs(m)} is symmetric in the two while abs(cos(b delta)/cos(M delta)) inverts. So the thresholds depend on the ordered pair and the falling a < 2b staircase is the reciprocal of the rising a > 2b one: 5/1 inside steps at 3.674234614175 and 5/4 inside at 0.272165527. Verified: over all 210 swaps with b + M at most 26, every tangency reach times its partner is 1 to within 1.47e-13.
A trochoid has a point of multiplicity above two at exactly one reach, M/b. Proved. A multiple point needs every pairwise delta to be a multiple of pi/a, and such a delta solves the crossing equation only there, where the curve runs through the centre at the a parameters (2j+1) pi/a; so the distinct double point count equals the parameter pair count everywhere else and falls short by C(a, 2) - 1 there. Verified off mrlynum::spirograph::trace at 24001 samples with a odd, reading 1 for 3/1, 5/2, 5/3 and 7/4 inside, 6 for 5/1 and 5/4 inside, 8 for 7/2 inside, 7 for 3/1, 10 for 3/2 and 21 for 5/2 outside, the two counts agreeing three percent either side. When a is even, delta = pi/2 is always a tangency angle and its reach is that same rational M/b, so a step and the centre correction fall together and the step function is not read there.
Two pencils at complex seats p and p' on one wheel, drawing distinct curves, meet at exactly (a/2) N unordered parameter pairs, where N counts the roots in [0, 2 pi) of M^2 sin^2(b delta) = b^2 (P sin^2(M delta) + E cos^2(M delta) - s X sin(2 M delta)) with P and E the squared halves of the sum and the difference of the seats and X half the imaginary part of p' times the conjugate of p. Proved; the equation is pi periodic in delta, so N is even and the halving is exact. It matches the trace on 48 reads over 5/1, 7/2 and 8/3 inside and 5/2 outside at reaches 0.6, 1.3, 2.4 and 3.7 against three seat kinds, on the parameter pair count exactly. Verified.
A pair law counts parameter pairs, and a point count needs more. Proved. No self crossing of either curve may lie on the other, and neither seat may sit at reach M/b; the extra condition is codimension one and is not implied by the curves being distinct. The witness is 3/1 inside with one seat at reach sqrt 5 - 1 and one at the wheel's centre: six parameter pairs and three points, all at radius A, while two percent either side gives six points. That centre pencil draws the circle of radius A, and against a pencil at reach abs(p) the pair law collapses to abs(sin(b delta)) = abs(p)/(2A), so the two curves meet 2ab times below reach 2A and never above, read off the trace as 48 then 0 across reach 10/3 on 8/3 inside. Proved.
The pair count 2ab survives the loop threshold, which is a tangency of one curve with itself and never of two curves with each other. Verified. For two seats at one reach and half angle nu apart on 5/1 inside it holds up to 2.242763, 1.741061, 1.379486, 1.143270, 1.047854, 1.010207 and 1.002194 for nu of 1, 0.5, 0.2, 0.05, 0.01, 0.001 and 0.0001. The pair threshold is not monotone in nu: 8/3 inside gives 1.117596 at nu = 1 against 1.523254 at nu = 0.5.
The alignment reaches
The node law holds at a generic reach, and the exceptions are a set of isolated reaches where branches from three or four curves run through one point. Finding them needs a second reduction, and it is a scalar one. A pencil at complex seat p on a circle track a/b draws z(psi) = r e^(i b psi) (A + p e^(i s a psi)) on psi in [0, 2 pi). Proved, and Verified against mrlynum::spirograph::point to 2.138e-13 over all 98 circle tracks with b from 1 to 8 and a from b + 1 to 13 coprime, both sides, on all eight carpet fill seats at reach 0.83 and 29 phases a seat (lab/rs/roulette-reaches).
The picture turns a fold and the seat modulus is the only shape parameter. Proved: z(psi + 2 pi/a) = e^(2 pi i b/a) z(psi), and turning the seat by alpha turns the whole curve by -s b alpha/a, the same rotation the mirror lines above take, so the four seats of one square orbit draw four rotations of one master curve.
The instrument is a mark, written mu here because m is taken above. Writing x for the seat's phase and mu(x) = 4 a (b s x/a + arg(A + p e^(ix)))/pi, the radius abs(A + p e^(ix)) is strictly decreasing on [0, pi], so the curve meets every circle strictly between its two apex radii in exactly 2a points, at the angles c + mu/8 and c - mu/8 in units of a turn over a, with seat offset c = -b s arg(p)/(2 pi). Proved. The offset of a carpet seat is an exact eighth, -b s d mod 8 for the seat's compass index d, so every meeting test is integer arithmetic on the eighths and never a tolerance.
The mark is one to one in the radius exactly on abs(p) < min(1, A), and that window, not abs(p) < 1, is what the node counts need. Proved. While abs(p) < A the derivative of arg(A + p e^(ix)) grows with cos x, running from -abs(p)/(A - abs(p)) at x = pi to abs(p)/(A + abs(p)) at x = 0, and the binding one, x = 0 inside and x = pi outside, stays under b/a exactly when abs(p) < 1; past A the point A + p e^(ix) circles the origin, the derivative at x = pi exceeds one and the mark turns back. The window is sharp but for one endpoint: at abs(p) = 1 the binding derivative meets b/a at the single phase x = 0 inside and at x = pi outside, so the mark is still one to one there, and every larger modulus fails.
Two trochoids of one seat modulus whose seat offsets differ by a quarter turn 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. Proved. The quarter turn is a hypothesis and not decoration: seats a fifth of a turn apart on 7/3 inside cross where the mark is plus or minus 1.2 modulo four. Inside the window the mark's range has length 4b, so there are b - 1 self crossing circles and 2b crossing circles, giving a(b - 1) and 2ab a second time from a route sharing no step with the torus reduction. Proved.
Three trochoids of one seat modulus on a circle track never run through one point unless the modulus is A. Proved. The radius squared A^2 + abs(p)^2 + 2 A abs(p) cos x is strictly decreasing in x on [0, pi], so one radius fixes one phase and one mark for all three at once; the angles are c + mu/8 and c - mu/8, two of the three must share a sign, and that forces their seat offsets to differ by a multiple of a turn over a, which by the coincidence law makes those two curves the same curve. The argument needs only the monotone radius, so it carries past the one to one window, holds for b even, and holds at both apexes where the two signs merge. At seat modulus A every trochoid of that modulus runs through the centre, a times each. Proved; inside this needs b < a < 2b for a modulus under one, and outside it never happens, since A = a/b + 1 exceeds one.
An alignment therefore needs two seat moduli, which the carpet has: corner seats at abs(p) = 2t/3 and edge seats at sqrt 2 t/3 for reach t. A meeting happens exactly when both marks are whole numbers at one radius and one eighth class collects three or more branches; each meeting class holds a points because the picture turns a fold, and each meeting swallows five of the generic picture's double points. Proved. That a transversal alignment carries 4/gcd(b, 4) meeting classes is Verified (lab/rs/roulette-reaches), read over the eight b groups of the sweep and not per alignment.
The node count drops at an alignment. Verified (lab/rs/roulette-reaches). The 7/3 inside transversal reach near 0.79 is 0.791009415157, bisected to a bracket of 1.1e-16, which certifies every digit printed, with marks (-6, -9), ring 1.005704332357 wheel radii, corner seat modulus 0.527339610104 and exact law residual 4.18e-15; two corner seats and two edge seats meet there, in four classes of seven points, and the picture carries 184 crossing classes at a generic reach against 164 at the alignment, so 1288 nodes against 1148. The four meeting seats sit 2.167e-5, 1.441e-6, 7.697e-8 and 5.590e-9 from the point the algebra names, read in f64 off mrlynum::spirograph::point at 2000, 8000, 32000 and 128000 samples, falling like the square of the sample count, while the other four seats stay 1.206e-1 away; read off mrlynum::spirograph::trace, which returns f32, the same columns are 2.162e-5, 1.526e-6 and 1.109e-7, and since half an f32 step at that radius is 1.192e-7 only the earlier two carry the square law. At the control reaches 0.781009 and 0.801009 no class carries more than two branches and the four seats stand 1.767e-2 and 1.771e-2 off.
The alignment family is not thin. Verified (lab/rs/roulette-reaches). The 7/3 inside carpet has 24 alignment reaches over the scan 0.05 < t < 1.4999, 21 transversal and 3 tangential; every transversal meeting carries four branches, twelve of them from four distinct curves and nine from three, one curve bringing two branches where its own self crossing lands on the meeting. The tangential family exists because inside the window the corner band contains the edge band, so a corner pair's crossing radius sweeps through both edge apex radii; on 7/3 inside three such reaches sit in the scan, at 0.687455178256 with marks (-7, -12), 0.948942238176 with (-1, 0) and 1.176138007019 with (-5, -12). Over all 98 circle tracks inside the window the scan finds 2157 alignment reaches, 193 of them tangential, every one read against mrlynum::spirograph::point and mrlynum::spirograph::trace and holding, the 1964 transversal ones also carrying a class past two branches in the census, worst gap 2.445e-4 against a worst f32 floor of 9.537e-7, and none of the 98 control reaches carrying one. The counts converge in the scan: 7/3 inside reads 24, 12/7 inside 153, 13/7 inside 177, 9/5 inside 89, 13/8 inside 11 and 13/7 outside 61, each at both 6000 and 24000 steps.
An alignment reach lies in a real algebraic set over the field generated by sqrt 2. Proved. A trochoid sits at whole mark congruent to j modulo four exactly where w^(a + 2 b s) (A + p w)^a = i^j (A w + p)^a on the unit circle, which follows from abs(A + p w)^2 = (A + p w)(A w + p)/w; squaring the mark condition loses half the angle, so the law pins the mark only modulo four. That law for the corner modulus, the same law for the edge modulus, and the equal radius equation are three real equations in three real unknowns, and the alignment reaches are a proper closed subset of their solution set, proper because the marks -10, -6 and -2 share one system on 7/3 inside. The mod-four branches are disjoint and closed inside the window, since the mark is continuous there, so an isolated alignment reach is an isolated point of that set and hence an algebraic number. That every alignment reach is isolated, and so algebraic, is Conjecture: the scan finds each reach as a simple sign change of a continuous defect and no two of the reaches found coincide, but nothing in the run certifies isolation, which leaves either answer open; no minimal polynomial of a reach is computed here.
The walls
Every curve is a wall no fluid crosses. Pour fluid in from the raster's edge and it stops at the outer wall, stitched from the outermost arcs of the curves; pour it at the centre of the track and it stops at the inner wall. The shape between the two walls, pockets and walls included, is what mrlynum::spirograph::cover measures, and covered is its share of the enclosing disc. This section writes the track's own units, rho = r A for the centre circle's radius and d = r abs(p) for a seat's distance from the wheel's centre, because the closed forms below are stated in them.
A pencil's closed trochoid sweeps signed area pi b rho (rho -+ d^2/r), minus inside and plus outside, counterclockwise positive and counted with multiplicity, so it is the winding number integrated over the plane. Proved (mrlynum::spirograph::signed_area, lab/rs/roulette-cover). Green's theorem on z(t) = rho e^(i t) + p r e^(-+ i (rho/r) t) gives it, the cross terms carrying e^(-+ i a t/b) over b centre turns and integrating to zero, and no hypothesis on the reach is needed, since loops are counted with their sign.
Every curve lies in the closed annulus from abs(rho - d) to rho + d about the track's centre and attains both bounds. Proved, since abs(z)^2 = rho^2 + d^2 + 2 rho d cos(a t/b -+ arg p) and the phase runs over a full turns. The whole roulette therefore sits in the disc of radius rho + max d and enters no disc of radius under min abs(rho - d), the least over the seats and not the outermost seat's own, since seats on either side of rho each keep their own inner radius. A trace of 200001 points per curve meets both radii on all 48 cases with worst gap 3.55e-15, the five ratios with a seat past rho included (mrlynum::spirograph::disc).
The fluid poured at the centre always fills at least the disc of radius min abs(rho - d), which no curve enters, so the hole is at least that radius over the disc's radius, squared. Proved. The raster reads no leak on all 48 cases, the slack running from 0.000111 at four quarter-turn copies inside 7/3 to 0.461499 at one pencil outside 2/1, and to 0.142005 at one pencil inside 4/1 over the inside cases alone. Read instead with the outermost seat the bound is false, and one pencil inside 5/4 at reach 0.9 is the smallest counterexample, its inner radius 2.6 rather than rho - d.
At b = 1 with one distinct curve below the loop threshold the roulette is a simple closed curve on both sides, so its complement has exactly two components. Proved. The shape between the walls is then the wall alone and covers nothing, while the fluid poured at the centre fills the whole inside, the centre lying inside because the winding number about it is b = 1; the hole is the signed area over the disc's area, rho (rho -+ d^2/r)/(rho + d)^2, minus inside and plus outside, met to 8.70e-5 at worst over the 16 ratios 2/1 to 9/1 on both sides, while the cover falls like the pixel to at most 0.000124 in absolute value.
For one distinct curve the shape between the walls is empty exactly when the curve is simple, and of positive area as soon as the curve crosses itself. Proved, it being the union of the bounded complement components other than the one holding the centre. One pencil at reach 0.9 inside covers -0.000030 on a bar of 0.000064, zero to its bar, at 3/1 with no self crossing, 0.003269 at 3/2 with a(b - 1) = 3 crossings, and 0.273092 at 7/3 with 14.
The raster is checked against Green's theorem and never against itself. The mean signed winding number of the disc's pixel centres, read by scanline against the polylines and never off a flood, meets the sum of the distinct curves' signed areas over the disc's area on all 48 cases at all four raster sides. Verified (lab/rs/roulette-cover), worst gap 1.73e-3 at the carpet's corners outside 5/8 at side 256 and 4.84e-4 at side 2048, with no reading outside the perimeter bound; at side 2048 it reads 0.282984 against 0.282996 for one pencil inside 3/1, 1.678772 against 1.678770 for four quarter-turn copies inside 7/3, and 9.103089 against 9.103448 for the carpet's fills inside 7/3.
The raster cover converges like the pixel. Verified. On all 48 cases the successive differences fall by a factor of at most 0.626 as the side doubles from 256 to 2048, so the Richardson limit of a 1/n law carries a bar of at most 0.000354. The carpet's fills inside 7/3 at reach 0.9 cover 0.800044 on a bar of 0.000343 from the ladder 0.814487, 0.807142, 0.803764, 0.801904, its corners cover 0.765594, four quarter-turn copies of one seat cover 0.629299, two cover 0.443227 and one pencil covers 0.273092; outside 5/8 the fills cover 0.758414 and the corners 0.867284.
All three closed forms tried for the cover fail. Refuted (lab/rs/roulette-cover): 0 of 144 readings survive ten bars. The full annulus overshoots the carpet's fills inside 7/3 by 0.0561 and one pencil inside 2/1 by 0.99721; the sum of the enclosed areas reads 9.103448 against a cover that cannot pass 1; the single simple curve's form reads 0.139898 against a cover of 0.273092 for one pencil inside 7/3. Adding curves does not act independently either: four quarter-turn copies inside 7/3 cover 0.629299 where the independent-union guess 1 - (1 - p)^k on the single curve's 0.273092 gives 0.720798.
The literature
The trochoid is old and much of the ground above is trodden. What each source already carries is stated plainly, and every claim of this page that overlaps one of them is a restatement rather than a novelty.
- Wieleitner 1908, section 25, numbers 164 to 175, has the reach one trichotomy -
gestreckt,gespitzt,verschlungen- and the mirror line fact for the looped epitrochoid, qualitatively and with no bound: the primary double points lie on theScheitelgeradenby symmetry, and secondary ones appear once the reach is large enough. Verified at source. - Jaekel hypotrochoids has both staircase endpoints
a(b - 1)anda(M - 1), the split ata = 2b, and the step sizesaand2a. His transition reaches are found by Newton iteration and carry no closed form, and the page is not peer reviewed. Verified at source. What this page adds on the staircase is the tangency equation, the reaches in closed form, the sign count, the reciprocity, the centre correction and the pair law. - Sakhnovich 2023 has the
sin^2recursion this page uses, theorems 2.1 and 2.5, and the orbit structure of a self intersection of a two term chain, with a worked example whose local singular point sits at2/3, which this page's scheme reads as a tangency angle. Verified at source; the recursion is his, and onlyQ,TandBare new here. - MathWorld rose pins the rose curve to the hypotrochoid at seat reach
M/bexactly, which is the one reach where allabranches meet at the centre. Verified at source. - Erb rhodonea gives exact double point counts for rhodonea curves,
2(m_1 - 1) m_2off the origin whenm_1 + m_2is odd and(m_1 - 1) m_2 / 2when it is even, so(5, 3)reads 6 in the even case. Verified at source. - Dresden 2025 counts the intersections of an epitrochoid against a matched hypotrochoid, tangent at
jpoints inside,2jin the middle andjoutside for his own integerj; that is a matched pair of curves and not two pencils on one wheel. Verified in the author's own manuscript; the version of record refuses fetchers and is not read here. - MathWorld hypotrochoid and MathWorld epitrochoid carry the parametrisations and no self intersection content.
- Niven's theorem is the cut the coincidence law rests on: the only rational cosines at rational multiples of
piare0, +-1/2, +-1.
What is left
- Where the pair count dies past the seat threshold. The least reach at which two trochoids from seats at one reach and half angle
nuapart stop meeting2abtimes is above one for every positivenu, with infimum one and the excess falling likenu^(2/3). The reading is seven samplednuat one fraction,5/1inside, whose excesses fall by4.69then4.65per decade against10^(2/3) = 4.64; there is no bound and no third decade. Conjecture (lab/rs/roulette-loops). - The Farey sign-count lemma. The tangency angle count is
abs(M - b)on every coprime pair to frequency 220 in exact integers, and every angle moves the self crossing count by exactlya sign(m), so the staircase runs froma(b - 1)toa(M - 1)inabs(M - b)equal steps. What is missing is a proof that the merged Farey sign sequence changes sign exactlyabs(M - b) - 1times inside(0, pi). Conjecture (lab/rs/roulette-loops). - The exact area between the walls. No closed form shows itself on the small cases, and the walls are stitched at the parameters where the outermost and innermost arcs cross, so an exact area would be a sum over the regions those crossings cut, which no study here computes. Conjecture that a closed form exists at all (
lab/rs/roulette-cover). - The minimal polynomial of an alignment reach. Isolation is what turns the containment above into algebraicity, and nothing certifies it; a degree bound would come from the resultant of the three-equation system, and no reach here has one. Conjecture (
lab/rs/roulette-reaches). - How many alignment reaches a track carries. The count follows the window's own width, climbing with
ainside whilea < 2b, where the window isA, and falling oncea > 2b, where it is the fixed one, while outside it barely moves; every printed count is a lower bound, since the scan finds a reach only as a sign change on its grid. Conjecture (lab/rs/roulette-reaches). - The cell count of a rational roulette across levels. The node count sees the design only through
k, so the question is the growth of the cell set of a design at levellevelmodulo the rotations of ordergcd(b, 4), a Burnside count against the design's own symmetry group; what the resulting node count does aslevelgrows at fixeda/bis not computed here. Conjecture that it is a closed form in the design's fill polynomial and its symmetry class. - The ribbon on a line as the design's barcode. A line track collapses a seat to its radius alone, so a design's roulette there is one shape per distinct seat radius, translated; the radii multiset is the design's own barcode, and which designs it separates is open. Conjecture that it separates strictly fewer designs than the square-group orbit.
- The loop fraction as the design's radial mass. The staircase reads a curve through one number, the reach, so a whole design's crossing count above the loop threshold is a sum over its seats of a step function of the radius: the design enters through its radial mass at one radius and nothing else. Conjecture that the whole-design count above the threshold is a functional of that radial mass alone.
- Hexagonal and three-dimensional wheels. Nothing above uses the square lattice except the coincidence law's cut, which is Niven's, so a hexagonal wheel should cut at the rotations of order
gcd(b, 6)and readkmodulo those; in three dimensions a rolling wheel is a different object and no reduction here survives. Conjecture for the hexagonal case, untested.