跳到正文
Skillpedia
通用编程75k · #2673

manimce-best-practices

它能做什么

这项技能帮助开发者正确编写 Manim Community Edition 动画代码。适合用 Python 制作数学和科学动画的程序员。

适用场景

  • ✓当你用 Manim Community Edition 库编写 Python 代码时。
  • ✓当你需要用 Manim 为数学公式、文字或图形制作动画时。
  • ✓当你在 Manim 中构建三维场景,并需要正确的摄像机和对象规则时。

技能链接

https://github.com/calesthio/OpenMontage/blob/main/.agents/skills/manimce-best-practices/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请帮我编写一个 Manim 场景:一个正方形变成圆形,并附带一小段文字标签。”

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

工作原理

这项技能提供场景、图形、动画、LaTeX 公式、颜色和定位方面的规则与示例,让你的智能体能够编写可运行的 Manim 代码。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

How to use

Read individual rule files for detailed explanations and code examples:

Core Concepts

Creation & Transformation

Text & Math

Styling & Appearance

Positioning & Layout

Coordinate Systems & Graphing

Animation Control

Configuration & CLI

Shapes & Geometry

  • rules/shapes.md - Circle, Square, Rectangle, Polygon, and geometric primitives
  • rules/lines.md - Line, Arrow, Vector, DashedLine, and connectors

Working Examples

Complete, tested example files demonstrating common patterns:

Scene Templates

Copy and modify these templates to start new projects:

Quick Reference

Basic Scene Structure

from manim import *

class MyScene(Scene):
    def construct(self):
        # Create mobjects
        circle = Circle()

        # Add to scene (static)
        self.add(circle)

        # Or animate
        self.play(Create(circle))

        # Wait
        self.wait(1)

Render Command

# Basic render with preview
manim -pql scene.py MyScene

# Quality flags: -ql (low), -qm (medium), -qh (high), -qk (4k)
manim -pqh scene.py MyScene

Key Differences from 3b1b/ManimGL

Feature Manim Community 3b1b/ManimGL
Import from manim import * from manimlib import *
CLI manim manimgl
Math text MathTex(r"\pi") Tex(R"\pi")
Scene Scene InteractiveScene
Package manim (PyPI) manimgl (PyPI)

Jupyter Notebook Support

Use the %%manim cell magic:

%%manim -qm MyScene
class MyScene(Scene):
    def construct(self):
        self.play(Create(Circle()))

Common Pitfalls to Avoid

  1. Version confusion
常见问题

什么是 Manim Community Edition?

它是由社区维护的 Python 库,用于制作数学和科学动画。

它涵盖数学公式吗?

涵盖。它涵盖使用 MathTex 编写的 LaTeX 公式,以及如何为公式的各部分上色。

它涵盖三维内容吗?

涵盖。它涵盖三维场景和摄像机控制。

详情

作者的原始描述

Trigger when: (1) User mentions "manim" or "Manim Community" or "ManimCE", (2) Code contains `from manim import *`, (3) User runs `manim` CLI commands, (4) Working with Scene, MathTex, Create(), or ManimCE-specific classes. Best practices for Manim Community Edition - the community-maintained Python animation engine. Covers Scene structure, animations, LaTeX/MathTex, 3D with ThreeDScene, camera control, styling, and CLI usage. NOT for ManimGL/3b1b version (which uses `manimlib` imports and `manimgl` CLI).

repo: calesthio/OpenMontage

热度

GitHub 星标
75k
排名
#2673
许可证
AGPL-3.0
更新时间
2026/10/28

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能