AI and Machine Learning
Manim Video Generator
Type something like "show the Pythagorean theorem" and get back a short animated math video. Gemini writes the animation code and Manim, the engine behind 3Blue1Brown's videos, renders it.
Runs in the browser through a Colab notebook, with no local install.
01 / 03A sine wave traced by a point on the unit circle, from a one sentence prompt
Overview
Good math animations make ideas like derivatives or the unit circle click, but making one means learning Manim, a Python library with its own way of describing scenes, timing and transformations. Most teachers and students never get past that.
Manim Video Generator removes that step. You describe the animation in plain words, Gemini writes a complete Manim scene, and the scene is rendered to an MP4 that plays right away. It started as an MCP server that exposes rendering as a tool for AI assistants, then grew a terminal client and a Streamlit chat app that keeps a history of past animations.
A Colab notebook packs the whole flow into something anyone can open: it installs Manim and LaTeX, asks for a Gemini key, and shows the finished video inline.
Features
- Describe an animation in plain language and get a rendered video back
- Read and copy the generated Manim code to learn from it or tweak it
- Chat with the Streamlit app and revisit earlier animations from the sidebar history
- Let AI assistants render scenes through an MCP server tool
- Run everything in Google Colab with no local setup
Challenges
- Language models often write Manim code that uses outdated or invented APIs. The generator renders each scene, and when Manim fails it sends the error back to Gemini to fix the code, up to three attempts.
- Manim needs Cairo, Pango, FFmpeg and LaTeX installed at the system level, which is the main reason people give up on it. The Colab notebook installs them in one cell and, when LaTeX is skipped, tells the model to avoid formula objects so renders still succeed.
- Gemini models get retired or return busy errors, so the notebook falls back to other models automatically instead of failing the run.