登录 注册

manim (数学动画引擎)

去点 Star
图像、视频与音频开发者工具 3b1b-videosanimationexplanatory-math-videospython
96,389
Stars
7,920
Forks
958
Watchers
519
Open Issues
MIT
许可证
Python
语言
2015-03-22
创建时间
2026-09-09
最近更新

项目能做什么

用于制作数学科普与讲解视频的动画引擎。
来源:基于仓库元数据 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

项目简介

Manim 是一个通过代码驱动、用于制作精准动画的渲染引擎,专为数学科普与教学解释视频设计。

该仓库是知名数学科普频道 3Blue1Brown 作者最初为其视频制作开发的个人项目(ManimGL)。需注意:2020 年社区基于此项目分叉(Fork)出了社区版(Manim Community Edition)。本仓库为 3b1b 维护的版本,PyPI 包名为 manimgl,与社区版在安装与使用上均有区别。

核心功能

  • 程序化动画生成:通过 Python 代码编写数学动画与图形变换逻辑。
  • OpenGL 支持:采用 OpenGL 进行渲染。
  • LaTeX 公式渲染:原生集成 LaTeX 环境,支持复杂数学公式的排版与呈现。

适合谁用

  • 想复现或研究 3Blue1Brown 视频动画效果的开发者与创作者。
  • 需要通过精准数学动画进行科普、教学演示的教育工作者。

安装步骤

注意:本项目运行环境需要 Python 3.10 或更高版本。核心系统依赖为 FFmpeg、OpenGL,以及可选的 LaTeX(若需渲染公式)。安装包名为 manimgl,切勿安装成 manim 或 manimlib。

1. 快速安装(pip)

# 安装 manimgl
pip install manimgl

# 运行测试
manimgl

若需直接修改 manimlib 源码,可克隆仓库后进行本地开发安装:

git clone https://github.com/3b1b/manim.git
cd manim
pip install -e .

# 运行示例场景
manimgl example_scenes.py OpeningManimExample
# 或使用
manim-render example_scenes.py OpeningManimExample

2. Linux (Ubuntu/Debian)

  1. 安装系统依赖: sh sudo apt update sudo apt install ffmpeg python3-pip libpango1.0-dev
  2. (可选)安装轻量级 LaTeX 发行版: sh sudo apt install texlive-science texlive-fonts-extra texlive-latex-extra
  3. 克隆并安装 ManimGL: sh git clone https://github.com/3b1b/manim.git cd manim python3 -m pip install -e . manimgl example_scenes.py OpeningManimExample 可选:建议使用 python3 -m venv venv 虚拟环境隔离系统包。

3. Windows

  1. 安装 FFmpeg。
  2. 安装 LaTeX 发行版(推荐 MiKTeX)。
  3. 安装 Python 依赖: sh git clone https://github.com/3b1b/manim.git cd manim pip install -e . manimgl example_scenes.py OpeningManimExample

4. macOS

  1. 使用 Homebrew 安装 FFmpeg 与 LaTeX: sh brew install ffmpeg mactex 注:若不想安装庞大的 MacTeX,也可改用轻量版 BasicTeX。
  2. 若使用 ARM 架构芯片(如 M 系列),需额外安装 Cairo: sh arch -arm64 brew install pkg-config cairo
  3. 克隆并安装: sh git clone https://github.com/3b1b/manim.git cd manim pip install -e . manimgl example_scenes.py OpeningManimExample

注:README 中提及的 Anaconda 安装及后续使用说明因原文截断未完整提供,请查看原仓库。

配置说明

此部分原文未说明,请查看原仓库。

常见问题

  1. 版本混淆(ManimGL vs Manim Community): 本仓库是 3b1b 的 ManimGL,pip 安装的包名必须是 manimgl。如果混用社区版(manim)的教程或命令会导致报错。
  2. 终端提示找不到 manimgl 命令: 使用 pip install -e . 或 pip install manimgl 后,若提示命令不存在,请确认 pip 的可执行文件安装目录已正确加入到系统的 PATH 环境变量中。
原始 README 摘录(英文原文,节选前 3000 字符)
<p align="center">
    <a href="https://github.com/3b1b/manim">
        <img src="https://raw.githubusercontent.com/3b1b/manim/master/logo/cropped.png">
    </a>
</p>

[![pypi version](https://img.shields.io/pypi/v/manimgl?logo=pypi)](https://pypi.org/project/manimgl/)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](http://choosealicense.com/licenses/mit/)
[![Manim Subreddit](https://img.shields.io/reddit/subreddit-subscribers/manim.svg?color=ff4301&label=reddit&logo=reddit)](https://www.reddit.com/r/manim/)
[![Manim Discord](https://img.shields.io/discord/581738731934056449.svg?label=discord&logo=discord)](https://discord.com/invite/bYCyhM9Kz2)
[![docs](https://github.com/3b1b/manim/workflows/docs/badge.svg)](https://3b1b.github.io/manim/)

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](https://www.3blue1brown.com/) for the purpose of animating those videos, with video-specific code available [here](https://github.com/3b1b/videos).  In 2020 a group of developers forked it into what is now the [community edition](https://github.com/ManimCommunity/manim/), 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](https://docs.manim.community/en/stable/faq/installation.html#different-versions) for more details.

## Installation
> [!Warning]
> **WARNING:** These instructions are for ManimGL _only_. Trying to use these instructions to install [Manim Community/manim](https://github.com/ManimCommunity/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 is `manimgl` instead of `manim` or `manimlib`. Please use `pip install manimgl` to install the version in this repository.

Manim runs on Python 3.10 or higher.

System requirements are [FFmpeg](https://ffmpeg.org/), [OpenGL](https://www.opengl.org/) and [LaTeX](https://www.latex-project.org) (optional, if you want to use LaTeX).
For Linux, [Pango](https://pango.org) along with its development headers are required. See instruction [here](https://github.com/ManimCommunity/ManimPango#building).


### Directly

```sh
# Install manimgl
pip install manimgl

# Try it out
manimgl
```

For more options, take a look at the [Using manim](#using-manim) sections further below.

If you want to hack on manimlib itself, clone this repository and in that directory execute:

```sh
# Install manimgl
pip install -e .

# Try it out
manimgl example_scenes.py OpeningManimExample
# or
manim-render example_scenes.py Open
阅读完整原文

商业机会分析 规则生成(AI 未配置)

综合评分 57.4 分。该项目在“个人可实施性”维度得 60 分,“付费可能性”维度得 52.0 分,差异化空间 64.0 分(评分依据见评分卡)。

将 manim 改造为垂直场景 SaaS

产品构想保留核心能力,针对某一类用户(如某行业团队)做托管版,收取月费。
目标用户有该需求的中小团队 / 独立站长
难度/周期中 · 2~4 周(MVP)
收费模式订阅制(如 ¥29~99/月)
竞争风险需验证付费意愿;注意许可证合规
依据 数据支持的判断:许可证与关键词显示存在商用与付费场景

面向细分需求的二次开发产品

产品构想基于 manim 的核心能力,聚焦一个更窄的场景(如某平台、某行业)做差异化。
目标用户该细分场景用户
难度/周期中 · 2~6 周
收费模式买断制 / 订阅制 / 广告
竞争风险细分需求规模需验证
依据 AI 推测:基于项目主题标签的判断

封装为在线小工具或 API 服务

产品构想把项目最常用的一个功能做成网页小工具,靠流量变现或按量计费。
目标用户搜索引擎带来的长尾用户
难度/周期低 · 1~3 周
收费模式免费引流 + 增值功能 / API 按量计费
竞争风险同质化竞争,需做好 SEO
依据 AI 推测:基于技术栈与部署特征的判断
以上为规则引擎基于仓库公开数据生成的参考结论,包含推测成分,不构成投资或创业承诺;配置 AI 后可获得更深入的分析。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
vivek3141/videos 中文介绍暂未生成
Source code for all the animations in my videos. Uses @3b1b'
192 Python
CaftBotti/manim_pi_creatures 中文介绍暂未生成
All pi creatures that appear in 3b1b video, used for making
108 Python
undefined-ui/explain-skill 中文介绍暂未生成
Karpathy's output ladder as a Claude Code skill: ASD-STE100
27 Python
CelestialAmber/3Blue1Brown-Block-Collision-Problem-Unity 中文介绍暂未生成
Implementation of a solution to the pi Block Collision probl
23 C#
Micoael/3b1b-styled-video-code 中文介绍暂未生成
A respo that saves my 3b1b-styled video
9 Python
wchen777/visualizing-polya-vector-fields 中文介绍暂未生成
Manim animation code for 3B1B-style complex analysis video o
8 TeX
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2015-03-22,最近推送 2026-09-09,发布过 13 个 Release
社区活跃Star 96,389 / Fork 7,920 / Issue 519(数据支持,可自行核实)
许可证MIT
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/3b1b/manim.git
cd manim
# 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。