manim
Animation engine for explanatory math videos
Manim is a Python library for creating precise, programmatic math and explanatory animations, you describe what to draw and how to animate it in code, and Manim renders it as a video file.
Manim is an animation engine for creating precise, programmatic animations, originally designed for explanatory math videos. The author of the YouTube channel 3Blue1Brown built it to animate the mathematical illustrations in those videos. Instead of drawing each frame by hand or scrubbing a timeline in a video editor, you describe the animation in Python code — for example, "draw this circle, then transform it into a square, then label it" — and Manim renders the result as a video file or shows it in a window.
The way it works is that you write Python scripts that define scenes and the animations within each scene, then run a command like manimgl on the script. Manim plays the scene in a window or writes it out to a file. Command-line flags let you write the scene to a file, jump to the final frame, skip ahead to a specific animation, or run fullscreen. Configuration lives in a custom_config.yml file where you set output paths, asset locations, and quality defaults.
You would use Manim when you want to produce mathematical or explanatory animations programmatically — for tutorials, lecture videos, conceptual explainers, or science communication — and you want each animation to be reproducible from code rather than recreated by hand. The README points out there are two versions: this repository (called ManimGL, installed as the manimgl pip package) is the original one used by 3Blue1Brown, and a separate Manim Community Edition is a fork started in 2020 with a focus on stability and testing. Manim runs on Python 3.7 or higher and requires FFmpeg, OpenGL, and optionally LaTeX. Installation paths are described for pip, Windows, macOS, and Anaconda.
Where it fits
- Create a math tutorial video by writing a Python script that animates geometric shapes transforming with labels and equations.
- Produce reproducible lecture animations that can be re-rendered with code changes instead of redrawn by hand.
- Build science communication videos with programmatically precise animations for YouTube or classroom use.
- Combine LaTeX math notation with animated shapes to visualize a mathematical proof step by step.