ScriptsMar 29, 2026·2 min read

Manim — Mathematical Animation Engine

Community-maintained Python library for creating mathematical animations and explanatory videos. Used by 3Blue1Brown. 70,000+ GitHub stars.

TL;DR
Manim creates mathematical animations and explanatory videos in Python, used by 3Blue1Brown.
§01

What it is

Manim (Mathematical Animation Engine) is a community-maintained Python library for creating precise mathematical animations and explanatory videos. Originally created by Grant Sanderson for his 3Blue1Brown YouTube channel, the community edition (ManimCE) is actively maintained with a stable API, documentation, and regular releases.

Manim is for educators, math communicators, and content creators who need to produce animated visualizations of mathematical concepts, algorithms, and data structures.

The project is actively maintained with regular releases and a growing user community. Documentation covers common use cases, and the open-source nature means you can inspect the source code, contribute fixes, and adapt the tool to your specific requirements.

§02

How it saves time or tokens

Creating mathematical animations in traditional video editors (After Effects, Motion) requires manually placing and animating each element. Manim generates animations from Python code: define objects, specify transformations, and render. Changes to the math or layout require editing code, not re-animating by hand. A 30-second animation that takes hours in After Effects takes minutes in Manim.

§03

How to use

  1. Install Manim via pip.
  2. Write a Scene class with a construct method.
  3. Render with manim -pql scene.py ClassName.
§04

Example

from manim import *

class QuadraticFormula(Scene):
    def construct(self):
        equation = MathTex(
            'x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}'
        )
        self.play(Write(equation))
        self.wait()

        box = SurroundingRectangle(equation, color=BLUE)
        self.play(Create(box))
        self.wait(2)

class SortingVisualization(Scene):
    def construct(self):
        bars = VGroup(*[
            Rectangle(height=h, width=0.5, fill_opacity=0.7)
            for h in [3, 1, 4, 1, 5, 9, 2, 6]
        ]).arrange(RIGHT, buff=0.1)
        self.play(Create(bars))
        self.wait()
# Install and render
pip install manim
manim -pql scene.py QuadraticFormula
§05

Related on TokRepo

§06

Common pitfalls

  • Manim requires system dependencies (FFmpeg, LaTeX) for rendering. Missing FFmpeg causes 'command not found' errors; missing LaTeX causes MathTex failures.
  • There are two Manim versions: ManimCE (community, pip install manim) and ManimGL (Grant Sanderson's version, pip install manimgl). Their APIs are incompatible.
  • High-quality rendering (-qh or -qk flags) is significantly slower than preview quality (-pql). Use low quality for development and high quality only for final renders.

Before adopting this tool, evaluate whether it fits your team's existing workflow. Read the official documentation thoroughly, and start with a small proof-of-concept rather than a full migration. Community forums, GitHub issues, and Stack Overflow are valuable resources when you encounter edge cases not covered in the documentation.

Frequently Asked Questions

What is the difference between ManimCE and ManimGL?+

ManimCE (Community Edition) is the community-maintained version installed via pip install manim. ManimGL is Grant Sanderson's personal version (pip install manimgl) with OpenGL rendering. Their APIs are incompatible. ManimCE has better documentation and stability.

Does Manim require LaTeX?+

LaTeX is required only for MathTex and Tex objects. If you only use shapes, graphs, and text (Text class), LaTeX is not needed. Install a LaTeX distribution (TeX Live or MiKTeX) for mathematical notation.

What output formats does Manim support?+

Manim renders to MP4 video by default. It also supports GIF output, PNG sequences, and SVG for individual frames. The format is controlled via CLI flags.

Can Manim create 3D animations?+

Yes. ManimCE supports 3D scenes with ThreeDScene, 3D axes, surfaces, and camera movement. 3D rendering is slower than 2D but produces compelling visualizations of multivariable calculus and geometry.

How do I add voiceover to Manim videos?+

Manim itself does not record audio. Use the manim-voiceover plugin to synchronize text-to-speech or recorded audio with animation timing. The plugin integrates with AWS Polly, Google TTS, and local TTS engines.

Citations (3)
🙏

Source & Thanks

Created by ManimCommunity. Licensed under MIT. manim — ⭐ 70,000+ Docs: docs.manim.community

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets