Skip to content

Manim Fourier Series (Epicycles)

A Fourier series is a method of converting any closed path into a series of rotating vectors. This Manim tool makes generating these rotating vectors significantly easier.

Simply install:

pip3 install git+https://github.com/PeculiarProgrammer/manim-fourier-series.git

Warning

Manim must be installed. Only Python versions 3.11+ are supported.

And use:

from manim import *

from manim_fourier_series import FourierSeries

class BasicExample(Scene):
    def construct(self):
        fs = FourierSeries(
            FourierSeries.text("G", font="arial.ttf"), # If you get the error "Cannot open resource", try changing the font to a path
            number=100,
        )

        self.add(fs.mobject)

        self.play(fs.revolve(2), run_time=20, rate_func=linear)
OSError: cannot open resource

If the error cannot open resource is occurring, try changing font=arial.ttf to the path of a known font on your system.

Acknowledgments

Manim Fourier Series is an improved version of George Ogden's Fourier-Transform tool.

The package will be uploaded to PyPi as soon as the Outlook domain limitation has been lifted.