Setting up Manim and creating first animation in under 15 minutes
27 Nov 2020Walk-through for installing Manim aka Mathematical Animation Package on Mac.
Step 1: Install Dependencies
Step 2: Install Manim
Step 3: Set up a Manim project
Set up a project folder and create an empty python file.
Then add the following code in it.
from manim import *
class SquareToCircle(Scene):
def construct(self):
circle = Circle() # create a circle
circle.set_fill(PINK, opacity=0.5) # set the color and transparency
self.play(ShowCreation(circle)) # show the circle on screen
And run:
$ manim scene.py SquareToCircle -pl
Note: If you see an error like:
ModuleNotFoundError: No module named 'pangocairocffi._generated.ffi'
Then run:
$ pip3 uninstall pangocairocffi cairocffi
$ pip3 install --no-binary :all: -U pangocairocffi --no-cache