Skip to content

Add Fourier epicycles explorer - #34

Open
jbkunst wants to merge 5 commits into
masterfrom
feature/fourier-epicycles
Open

Add Fourier epicycles explorer#34
jbkunst wants to merge 5 commits into
masterfrom
feature/fourier-epicycles

Conversation

@jbkunst

@jbkunst jbkunst commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • adds a new fourier-epicycles Shinylive app based on the repository app structure
  • generates heart, star, square, and circle paths in R and resamples them at equal distances
  • converts each two-dimensional path to a complex signal and computes its Fourier coefficients with fft()
  • animates rotating circles and vectors with a small native Canvas implementation
  • compares the original and reconstructed paths with a base R plot
  • reports recovered Fourier energy and the marginal gain from the next circle
  • supports up to 60 circles, animation speed, display controls, and amplitude/frequency ordering

Implementation

  • app.R: 275 lines
  • www/epicycles.js: native Canvas and requestAnimationFrame(), without Highcharter or p5.js
  • R recalculates only when the shape or selected components change; animation remains entirely in the browser

Notes

  • no screenshot or build files are included; the existing gallery workflow handles the Shinylive export
  • JavaScript syntax was checked with Node
  • this environment does not include R, so the GitHub Actions build will provide the full Shinylive compatibility test

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