Skip to content

LimitPoint/Epicycles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Epicycles

Epicycles

Fourier coefficients of a 2D curve are generated with numerical integration and displayed as epicycles.

The associated Xcode project implements an iOS and macOS SwiftUI app that numerically calculates the Fourier series of sampled parametric curves (x(t), y(t)) in the plane, points drawn by the user, or the samples of finite Fourier series created with a terms editor.

Learn more about Epicycles from our in-depth blog post.

Experiment with complex Fourier series of the form:

By Euler's formula the n-th term (or frequency component) of the Fourier series is a complex number that traces a circle with radius rn in the 2D plane n times as t traverses an interval (period) of length 2π. The values of the sum trace the path of the function f(t) as t traverses an interval (period) of length 2π:

The circles in these animations that rotate on top of other circles are called epicycles. Each epicycle corresponds to a term of the complex Fourier series. The origin is at the constant term n = 0.

The partial sums of the Fourier series are used to draw the red line segment path in the animations, and also locate the centers of each blue epicycle circle. The radius of each epicycle circle is the magnitude of its corresponding Fourier series coefficient:

The origin of every red line segment path is determined by the constant term of the Fourier series, n = 0, and is fixed in time.

The end of every red line segment path is the value of the whole Fourier series, and is located at the green circle in the animations:

The green circle follows the approximating curve of the Fourier series, drawn in black over the orange curve of the function f(t):

About

Numerically calculate Fourier series for 2D curves and display using epicycles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published