Manim is an animation engine for explanatory math videos. It was written by Grant Sanderson and popularized by his YouTube channel, 3Blue1Brown.
Animating technical concepts is traditionally pretty tedious since it can be difficult to make the animations precise enough to convey them accurately. Manim uses Python to generate animations programmatically, which makes it possible to specify exactly how each one should look.
what we need to work with Manim,
- LaTex- by MikTex
for processing mathematical formulas - FFmpeg
for rendering purpose - Cairo
python graphics library - Sox (optional)
for sound
pip must be installed along with Python
1. MikTex
- Download installer from MikTex.org
MikTex.org > Downloads > (Your OS) > Installer(64bit | 32bit) - After downloading the installer, Installation through 2 steps:
1. Downloading MikTex
Setup:
- Run setup as administrator
- Download recommended in root directory
2. Installing the downloaded
- Run setup again
- Choose install and follow the default.
2. FFmpeg
- Download build from https://ffmpeg.org/download.html
- Unzip file to a folder at root(For non-modification of data in that folder)
- Add
/bin
address to systemPATH
check by$ ffmpeg
at command line.
3. Sox
- Download link: https://sourceforge.net/projects/sox/
- Download to the root as well
- Add sox.exe address to
PATH
check by$ sox
4. Cairo / pycairo
- Download link to binaries: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycairo
- check for specific version for your 32/64 bit operating system & cpXX where XX for your python version.
i.e for python3.7 and 64bit os => consider cp37 and win_amd64.whl - The downloaded file is of .whl extension. Open cmd prompt in the same terminal of the downladed file, run
python -m pip install <file_name>
. check by trying import in python shellimport cairo
.
once downloaded all the above, we have met the requirements to use manim. Now download the original github Manim by 3b1b
5. Download Python plugins & manim
- Download link: https://github.com/3b1b/manim/tree/3b088b12843b7a4459fe71eba96b70edafb7aa78
this one is a old commit link but it works well enough, we can definitely go for new one here. - Download repo as zip.
- Extract the zip
Plugins: - Remove pycairo from the requirements.txt > open cmd terminal here > run
python -m pip install -r requirements.txt
python -m pip install pydub
python -m pip install pyreadline
- Running manim:
Goto cmd terminal > cd downloaded-repo > runpython -m manim example_scenes.py SquareToCircle -pl
Herepython -m manim
is prefix required to run every manim file,example_scenes.py
is module containing examples,SquareToCircle is the class to render
. The-p
flag in the command above is for previewing, meaning the video file will automatically open when it is done rendering. The-l
flag is for a faster rendering at a lower quality.
Environment variables > Path
C:\MikTex\miktex\bin\x64\
C:\ffmpeg\bin\
Further reading here
Windows download guide: https://youtu.be/ZltiKHFWmv8v
Official documentation in progress https://eulertour.com/docs/