Skip to content

Converts any SVG image into a mathematical function by a complex Fourier Series

Notifications You must be signed in to change notification settings

gyndlf/Fourier-Funcinator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fourier Funcinator

Converts a SVG image into the complex Fourier series. See the wikipedia page for more information

The path object contains all the points to approximate the Fourier series on, and the series object contains the complex amplitudes of each term in the Fourier series.

Usage

Built for Julia v1.9.2 and up, but lower versions may also work. Simply import the module and you're away. Some example code is given in runner.jl.

using Fourier

# Load the path and generate the series
path = Fourier.load("FILENAME.svg")
series = Fourier.series(path, 30)

# To output a pasteable function for desmos.com use
println(Fourier.todesmos(series))

# Otherwise to generate a .gif animation
Fourier.animate_series(series, fname="FILENAME.gif", frames=600)

Examples

Example animation of a spiral Example animation of a tree

About

Converts any SVG image into a mathematical function by a complex Fourier Series

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages