Animation engine for explanatory math videos
https://github.com/3b1b/manim.git
Manim is an engine for precise programmatic animations, designed for creating explanatory math videos.
Note, there are two versions of manim. This repository began as a personal project by the author of 3Blue1Brown for the purpose of animating those videos, with video-specific code available here. In 2020 a group of developers forked it into what is now the community edition, with a goal of being more stable, better tested, quicker to respond to community contributions, and all around friendlier to get started with. See this page for more details.
[!Warning]
WARNING: These instructions are for ManimGL only. Trying to use these instructions to install Manim Community/manim or instructions there to install this version will cause problems. You should first decide which version you wish to install, then only follow the instructions for your desired version.
[!Note]
Note: To install manim directly through pip, please pay attention to the name of the installed package. This repository is ManimGL of 3b1b. The package name ismanimglinstead ofmanimormanimlib. Please usepip install manimglto install the version in this repository.
Manim runs on Python 3.7 or higher.
System requirements are FFmpeg, OpenGL and LaTeX (optional, if you want to use LaTeX). For Linux, Pango along with its development headers are required. See instruction here.
# Install manimgl
pip install manimgl
# Try it out
manimgl
For more options, take a look at the Using manim sections further below.
If you want to hack on manimlib itself, clone this repository and in that directory execute:
# Install manimgl
pip install -e .
# Try it out
manimgl example_scenes.py OpeningManimExample
# or
manim-render example_scenes.py OpeningManimExample
git clone https://github.com/3b1b/manim.git
cd manim
pip install -e .
manimgl example_scenes.py OpeningManimExample
brew install ffmpeg mactex
arch -arm64 brew install pkg-config cairo
git clone https://github.com/3b1b/manim.git
cd manim
pip install -e .
manimgl example_scenes.py OpeningManimExample (make sure to add manimgl to path first.)
conda create -n manim python=3.8.conda activate manim.pip install -e ..manimgl example_scenes.py OpeningManimExample
This should pop up a window playing a simple scene.
Look through the example scenes to see examples of the library's syntax, animation types and object types. In the 3b1b/videos repo, you can see all the code for 3blue1brown videos, though code from older videos may not be compatible with the most recent version of manim. The readme of that repo also outlines some details for how to set up a more interactive workflow, as shown in this manim demo video for example.
When running in the CLI, some useful flags include:
-w to write the scene to a file-o to write the scene to a file and open the result-s to skip to the end and just show the final frame.-so will save the final frame to an image and show it-n <number> to skip ahead to the n'th animation of a scene.-f to make the playback window fullscreenmanim-kindergarten wrote and collected some useful extra classes and some codes of videos in manimsandbox repo.