From d673f11be621544e02501fd9f38718a40183590d Mon Sep 17 00:00:00 2001 From: Josh Ott Date: Mon, 16 May 2022 23:50:43 -0400 Subject: Wrote README and added example --- README.md | 11 ++++++++++- example.jl | 8 ++++++++ jerma.gif | Bin 0 -> 740998 bytes 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 example.jl create mode 100644 jerma.gif diff --git a/README.md b/README.md index 84d4b86..3541b3b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,11 @@ # fourier -Fourier series animations from svg paths +Fourier series animations from svg paths with Julia. + +When generating the svg files, the following must be true: +* Relative positions are enforced (no upper case markers) +* All segments of the path are bezier curves (no corners) +* The path to draw must be the only path in the file + +This is easily accomplished in a program such as Inkscape. + +![Example gif](jerma.gif) \ No newline at end of file diff --git a/example.jl b/example.jl new file mode 100644 index 0000000..3dd01df --- /dev/null +++ b/example.jl @@ -0,0 +1,8 @@ +cd(@__DIR__) +include("fourier.jl") +include("bezier.jl") +include("animation.jl") + +curve = createCurve("graphics/jerma.svg") +C = calculateCoefficients(curve, 250) +createVideo(C, "jerma.gif", 400; width=250, n_drawing=2000, fps=30) \ No newline at end of file diff --git a/jerma.gif b/jerma.gif new file mode 100644 index 0000000..3ae47ba Binary files /dev/null and b/jerma.gif differ -- cgit v1.3