manim

pedagogic animations for python



3b1b’s manim is a curious passion project to create interactive python plots animations via code. It is famous on e.g. youtube. Here is a powerful example. I believe the community edition(source) is recommended for newcomers.

Here are some notes and links I need while using it.

Installation

Note dependencies:

sudo apt install libcairo2-dev libpango1.0-dev ffmpeg # Debian
brew install py3cairo ffmpeg pango scipy # macos
python -m pip install manim

Colaboratory and Binder installs available.

In jupyter

This is how we create a cell that will render itself:

%%manim -v WARNING --progress_bar None CreateCircle

class CreateCircle(Scene):
    def construct(self):
        circle = Circle()  # create a circle
        circle.set_fill(PINK, opacity=0.5)  # set the color and transparency
        self.play(Create(circle))  # show the circle on screen

The -v WARNING and --progress_bar None are to keep output minimalist.

It is somewhat hard to find documentation for this features by browsing, but it exists under ManimMagic, although there it punts lots of stuff to the manim command line.

In VS Code

There is an extension apparently. It doesn't work for me; for one it seems to use PowerShell, somehow, but then give an error about a missing /bin/sh. What shell/OS am I even supposed to be using?


No comments yet. Why not leave one?

GitHub-flavored Markdown & a sane subset of HTML is supported.