Fourier lab: 50,000-epicycle cap (FFT + scaled sampling), default speed 120 - #16
Merged
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.