跳到正文
Skillpedia
动效与动画33k · #9091

manim

它能做什么

这项技能指导你的智能体编写用于数学动画的 Manim 代码。适合制作教育类数学视频的教师、学生和内容创作者。

适用场景

  • ✓想用动画解释某个数学公式、图像或几何概念的时候。
  • ✓需要在视频中逐步展示 LaTeX 公式动画的时候。
  • ✓正在制作带坐标系和图像的分场景教学视频的时候。

技能链接

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/video/manim/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/video/manim/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我制作一段简短的 Manim 动画,展示曲线下的面积如何变成积分。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体编写 Python 场景,把数学对象放到屏幕上并为其添加动画,然后渲染出视频。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Manim Community - Mathematical Animation Engine

Comprehensive skill set for creating mathematical animations using Manim Community, a Python framework for creating explanatory math videos programmatically, popularized by 3Blue1Brown.

When to use

Use this skill whenever you are dealing with Manim code to obtain domain-specific knowledge about:

  • Creating mathematical animations and visualizations
  • Building educational video content programmatically
  • Working with geometric shapes and transformations
  • Animating LaTeX equations and mathematical formulas
  • Creating graphs, charts, and coordinate systems
  • Implementing scene-based animation sequences
  • Rendering high-quality mathematical diagrams
  • Building explanatory visual content for teaching

Core Concepts

Manim allows you to create animations using:

  • Scenes: Canvas for your animations where you orchestrate mobjects
  • Mobjects: Mathematical objects that can be displayed (shapes, text, equations)
  • Animations: Transformations applied to mobjects (Write, Create, Transform, FadeIn)
  • Transforms: Morphing between different states of mobjects
  • LaTeX Integration: Native support for rendering mathematical notation
  • Python Simplicity: Use Python to programmatically specify animation behavior

Key Features

  • Precise mathematical object positioning and transformations
  • Native LaTeX rendering for equations and formulas
  • Extensive shape library (circles, rectangles, arrows, polygons)
  • Coordinate systems and function graphing
  • Boolean operations on geometric shapes
  • Camera controls and scene management
  • High-quality video rendering
  • IPython/Jupyter notebook integration
  • VS Code extension with live preview

How to use

Read individual rule files for detailed explanations and code examples:

Core Concepts

For additional topics including transforms, timing, shapes, coordinate systems, 3D animations, camera movement, and advanced features, refer to the comprehensive Manim Community documentation.

Quick Start Example

from manim import *

class SquareToCircle(Scene):
    def construct(self):
        # Create a square
        square = Square()
        square.set_fill(BLUE, opacity=0.5)

        # Create a circle
        circle = Circle()
        circle.set_fill(RED, opacity=0.5)

        # Animate square creation
        self.play(Create(square))
        self.wait(1)

        # Transform square into circle
        self.play(Transform(square, circle))
        self.wait(1)

        # Fade out
        self.play(FadeOut(square))

Render with: manim -pql script.py SquareToCircle

Best Practices

  1. Inherit from Scene - All animations should be in a class inheriting from Scene
  2. Use construct() method - Place all animation code inside the construct() method
  3. Think in layers - Add mobjects to the scene before animating them
  4. Use self.play() - Animate mobjects using self.play(Animation(...))
  5. Test with low quality - Use -ql flag for faster preview renders
  6. Leverage LaTeX - Use Tex() and MathTex() for mathematical notation
  7. Group related objects - Use VGroup to manage multiple mobjects together
  8. Preview frequently - Use -p flag to automatically open rendered videos

Command Line Usage

# Preview at low quality (fast)
manim -pql script.py SceneName

# Render at high quality
manim -pqh script.py SceneName

# Save last frame as image
manim -s script.py SceneName

# Render multiple scenes
manim script.py Scene1 Scene2

Resources

常见问题

需要懂 Python 吗?

需要一些 Python 知识,但智能体会根据你的描述编写代码。

它支持公式吗?

支持。该技能涵盖数学公式的 LaTeX 渲染。

它是官方库吗?

该技能指的是 Manim Community,即该框架的开源版本。

详情

作者的原始描述

Comprehensive guide for Manim Community - Python framework for creating mathematical animations and educational videos with programmatic control

repo: davila7/claude-code-templates

热度

GitHub 星标
33k
排名
#9091
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能