Skip to content
explainroo
Tools and alternatives

Manim: Making Math and Science Animations in Python

Updated 4 min read

With explainroo explainroo vs. Remotion for Narrated Explainer Videos
On this page
  1. What Manim does
  2. Choose the Manim edition before installing
  3. Build an animation from code
  4. When explainroo is a better fit

When a formula, graph, or scientific process is easier to understand in motion, Manim lets you build the animation with Python code. You describe objects such as equations and shapes. Then you define how they move, change, or appear. Manim renders the scene as a video. To revise it, edit the code and render it again.

Manim is an open-source animation library created by Grant Sanderson, the educator behind 3Blue1Brown. It suits people who want precise control over visual explanations and are comfortable writing Python. If you want an AI coding agent to make a narrated explainer video or product demo instead, explainroo is a free, open-source alternative.

What Manim does

Manim turns Python instructions into mathematical and scientific animations. A script can draw a coordinate plane, place a curve on it, and animate a point moving along that curve. It can also show an equation changing step by step, so viewers see each transformation rather than only the final result.

In Manim Community Edition, a typical animation is organized as a scene, the part of a video that contains its own objects and actions. A scene is a Python class built on Scene; its construct method specifies what appears and how it changes. The objects in a scene, such as text, shapes, and graphs, are called mobjects. The Community Edition scene documentation describes how scenes manage those objects and animations.

Manim is useful when an explanation depends on exact geometry, timing, or transformations. For example, you can define a curve from a mathematical function and animate a marker along it, keeping the visual tied to the underlying expression. The official example gallery offers code examples to adapt.

Choose the Manim edition before installing

“Manim” refers to two related projects. Grant Sanderson’s original implementation is commonly called ManimGL, while Manim Community Edition is a separate project forked from the original in 2020. The original 3Blue1Brown Manim repository explains the distinction and warns that code from older videos may not work with current versions.

For a new project, choose the edition whose documentation and examples match the code you want to use. Avoid copying an old video’s script without checking its version: class names, methods, and other details may have changed. The Community Edition’s example gallery is a practical starting point for current patterns.

Installation requirements depend on the edition and operating system. The original repository lists Python 3.10 or later, FFmpeg for video rendering, and OpenGL; LaTeX is optional for typesetting, and Linux installations also need Pango. Check the instructions for your chosen edition before installing dependencies.

The Manim Editor is a separate Python package for working with Manim scenes. Its installation documentation requires FFmpeg to be available through the ffmpeg command and recommends manual installation on Windows. Install the editor and a Manim edition separately.

Build an animation from code

Start with a short scene that shows one idea, such as how a line’s slope changes when one point moves. Add the coordinate axes and the line, then animate the point and update the line alongside it. Tie each visual change to the concept so you can spot errors and revise the animation more easily.

Build a Manim animation as a sequence of clear changes. You choose where an object appears, when it moves, and what replaces it. This control helps when a lesson’s diagram must match a derivation precisely. It also means you need to write and maintain the scene code yourself.

Text and formulas need their own setup. LaTeX is a common option for mathematical typesetting; Community Edition v0.21.0 also supports Typst and MathTypst as alternatives. If a project relies on one of these tools, check that it is installed and supported by the Manim edition you selected.

When explainroo is a better fit

Manim is a strong choice when Python code should control the math, geometry, or animation. explainroo fits a different job: making narrated explainer videos and product demos through an AI coding agent. It is a free, open-source kit under the MIT license, and it works with Claude Code, Codex, Pi, OpenCode, Gemini CLI, and other agents that can run shell commands. The project says it works best with Claude Code.

The agent writes script.md for the narration and scenes.js to describe what to draw and when to show it. explainroo uses Kokoro, an open voice model, to narrate in natural American or British English. Whisper aligns pictures with spoken words, while Chrome draws frames on an HTML canvas. The kit then assembles the video into an MP4. It also gives the agent scene stills, a contact sheet, and checks for clipped or overlapping text and mispronounced words.

For a product demo, the agent can rebuild screens from a product’s code or website and animate a pointer clicking buttons and entering text. explainroo is a better fit when narration, timed visuals, or a narrated walkthrough matters more than writing each animation in Python. It does not edit existing camera footage. It also does not create talking avatars, and it has no drag-and-drop editor.

To try it, paste this prompt into a supported coding agent and replace the bracketed topic:

Make me a short explainer video about [your topic]. Use explainroo for it: clone the explainroo repository, read its AGENTS.md and follow the steps.

The agent sets up explainroo, creates and checks the video, and provides an MP4. The coding agent is a separate service with its own pricing; explainroo itself costs nothing per video except for optional AI illustrations through OpenRouter, which are paid per image. See the explainroo documentation for setup details and example videos for its output.

Free and open source

Let your AI agent make the video

explainroo lets a coding agent like Claude Code or Codex make narrated explainer videos and product demos. The voice, the word timing and the rendering run on your own computer, with no API key and no cost per video.

Copy this into your AI agent

Make me a short explainer video about [your topic]. Use explainroo for it: clone https://github.com/vincentsch/explainroo, read its AGENTS.md and follow the steps.

Getting started Example videos GitHub

Made with explainroo: How HTTPS keeps your password secret

More on tools and alternatives

All guides on tools and alternatives