Skip to content

Fourier lab: 50,000-epicycle cap (FFT + scaled sampling), default speed 120 - #16

Merged
benjamin-small merged 1 commit into
mainfrom
feat/fourier-50k-epicycles
Sep 8, 2026
Merged

Fourier lab: 50,000-epicycle cap (FFT + scaled sampling), default speed 120#16
benjamin-small merged 1 commit into
mainfrom
feat/fourier-50k-epicycles

Conversation

@benjamin-small

Copy link
Copy Markdown
Owner

Raising the cap required real work underneath: K ≤ M−1, so the lab now samples the text at a power-of-two count that scales with the requested epicycles (2048–65536), and the rule uses a radix-2 FFT for power-of-two inputs (naive DFT kept for other sizes; equivalence test added). Trace steps are decoupled from sample count (2000) so a trace still takes ~17 s at the new default speed 120. The viz culls sub-pixel arms like it already culled sub-pixel rings. Tests: Rust +2, web +2.

… speed 120

The term count is bounded by the sample count (K ≤ M−1), so raising the
cap alone would have done nothing. The lab now requests a power-of-two
sample count that grows with the requested epicycles (2048 → 65536), and
the rule takes a radix-2 FFT path for power-of-two inputs (O(M log M);
the naive O(M²) DFT remains for other sizes, with an equivalence test).
The trace step count is decoupled from the sample count (2000 steps),
so a full trace still takes ~17 s at the new default speed of 120.
The viz skips arms whose ring is sub-pixel — with 50k terms nearly all
are — so per-frame geometry stays proportional to what's visible.
Schema/input/URL cap: 2000 → 50,000. Test mocks of textPath keep its
pure helpers real (partial mock).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@benjamin-small
benjamin-small merged commit 55c2372 into main Sep 8, 2026
6 checks passed
@benjamin-small
benjamin-small deleted the feat/fourier-50k-epicycles branch September 8, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant