The Discrete Fourier Transform
Approximating and drawing closed curves with epicycles
by Juan Carlos Ponce Campuzano, 20/August/2018
Introduction
The Discrete Fourier Transform is defined as
A few important notes:
number of time samples we have current sample we're considering-
value of the signal at time current frequency we're considering (0 Hertz up to Hertz) amount of frequency in the signal (amplitude and phase, a complex number)
Drawing a T-Rex with epicycles
The animation below with epicycles demonstrates
how a simple sum of complex numbers in terms of phases/amplitudes can be nicely
visualized as a set of concatenated circles in the complex plane. Each circle
represents a Fourier coefficient
Originally the T-Rex curve (signal) is defined with 203 points. After calculating
the Fourier coefficient
Aproximating T-Rex with parametric equations
It is possible to approximate the T-Rex curve. In this case we can use the Fourier coefficients
The method to create the system of epicycles to draw a T-rex works also for any possible periodic signal.
Further details
For more details about how this method works and how to implement it in p5js, see:
How it works?- Tracing closed curves with epicycles: A fun application of the discrete Fourier transform.
- Trigonometric intepolation using the Discrete Fourier Transform.
Finally, if you find this content useful, please consider supporting my work using the links below.
∞ Thanks!
More applets
Here are more fun interactive applets that you can play with. Just click on the image to open the live demo! Enjoy! 😃
Further reading
- Brigham, E. O. (1988). The fast Fourier transform and its applications. Prentice-Hall, Inc. USA.
- Cooley, J. W. and Tukey, J. W. (1965). An algorithm for the machine calculation of complex fourierseries. Mathematics of Computation, 19:297-301.
- Ginnobili, S. and Carman, C. C. (2008). Deferentes, epiciclos y adaptaciones. Associacao de Filosofiae Historia da Ciencia do Cone Sul (AFHIC), 5:399-408.
- Hanson, N. R. (1965). The mathematical power of epicyclical astronomy. Isis, 51:150-158.
- Ponce Campuzano, J. C. (2023). Tracing closed curves with epicycles: A fun application of the Discrete Fourier Transform. North American GeoGebra Journal. Vol 11. No. 1. pp. 1-14.
- Ponce Campuzano, J. C. (2022). Trigonometric intepolation using the Discrete Fourier Transform. North American GeoGebra Journal. Vol. 10. No. 1. pp. 1-13.
- Sundararajan, D. (2018). Fourier Analysis - A Signal Processing Approach. Springer Singapur.
- Stein, E. M. and Shakarchi, R. (2003). Fourier Analysis: An Introduction. Princeton University PressOxford.