- Basic FFT class structure
- Data point generation from function strings (Step 1)
- Twiddle factor (W) computation for roots of unity (Step 2a)
- Bit reversal lookup table (Step 2b)
- Butterfly computation implementation (Step 3)
- Coefficient Extraction (Step 4)
- Fourier Series Construction (Step 5)
- Visualizations
- Function and N-point interactive UI options
- Unit tests of all math process steps
index.html
: P5.js setup and configurationComplex.js
: Complex number operationsFFT.js
: Main FFT class implementationsketch.js
: Testing and visualization framework
- Input size (N) must be a power of 2
- Complex numbers represented as
{re, im}
objects - Twiddle factors (W) computed with looping optimization
- Supports arbitrary function input via string parsing
- Interactive visualization with real-time updates
- Power of 2 input validation
- Point generation and spacing verification
- Bit reversal algorithm
- Butterfly pair generation for all stages
- Twiddle factor computation accuracy
- Precompute twiddle factors for performance
- Add unit tests for complex number operations
- Add unit tests for function string parsing and evaluation