mcpField
M
manimce-best-practices

manimce-best-practices

github.com/adithya-s-k创意与媒体1.2k4.0k 次安装40 周前更新
代码仓库

关于 manimce-best-practices

面向 Manim Community 用户的参考技能,提供动画场景构建与渲染指南及示例,并说明与 ManimGL 的差异,帮助规避版本相关问题。

主要功能

  1. 01场景、对象与动画规则
  2. 02文本、数学公式和样式指南
  3. 03定位、绘图与 3D 主题
  4. 04经过测试的示例和场景模板
  5. 05命令行、配置与故障排查

适用场景

  1. 01规划 Manim Community 场景
  2. 02制作数学或图表动画
  3. 03查找渲染命令和选项

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/adithya-s-k/manim_skill --skill manimce-best-practices

安装后在 Claude Code 中输入/manimce-best-practices确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

LICENSE.txt
examples/
3d_visualization.py
basic_animations.py
graph_plotting.py
lorenz_attractor.py
math_visualization.py
updater_patterns.py
examples/attention/
__init__.py
helpers.py
scenes.py
rules/
3d.md
animation-groups.md
animations.md
axes.md
camera.md
cli.md
colors.md
config.md
creation-animations.md
graphing.md
grouping.md
latex.md
lines.md
mobjects.md
positioning.md
scenes.md
shapes.md
styling.md
text-animations.md
text.md

详细介绍

使用方法

阅读各规则文件,了解详细说明和代码示例:

核心概念
创建与变换
文本与数学
样式与外观
定位与布局
坐标系与绘图
动画控制
配置与 CLI
形状与几何

实用示例

展示常见模式的完整测试示例文件:

场景模板

复制并修改这些模板,以启动新项目:

快速参考

基本场景结构
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)
渲染命令
# Basic render with preview
manim -pql scene.py MyScene

# Quality flags: -ql (low), -qm (medium), -qh (high), -qk (4k)
manim -pqh scene.py MyScene
与 3b1b/ManimGL 的主要区别
特性Manim Community3b1b/ManimGL
导入from manim import *from manimlib import *
CLImanimmanimgl
数学文本MathTex(r"\pi")Tex(R"\pi")
场景SceneInteractiveScene
包manim (PyPI)manimgl (PyPI)
Jupyter Notebook 支持

使用 %%manim 单元魔法命令:

%%manim -qm MyScene
class MyScene(Scene):
    def construct(self):
        self.play(Create(Circle()))
应避免的常见问题
  1. 版本混淆 - 确保使用的是 manim(Community),而不是 manimgl(3b1b 版本)
  2. 检查导入语句 - from manim import * 属于 ManimCE;from manimlib import * 属于 ManimGL
  3. 教程过时 - 视频教程可能已经过时;请优先参考官方文档
  4. manimpango 问题 - 如果文本渲染失败,请检查 manimpango 的安装要求
  5. PATH 问题(Windows) - 如果找不到 manim 命令,请使用 python -m manim 或检查 PATH
安装
# Install Manim Community
pip install manim

# Check installation
manim checkhealth
常用命令
manim -pql scene.py Scene    # Preview low quality (development)
manim -pqh scene.py Scene    # Preview high quality
manim --format gif scene.py  # Output as GIF
manim checkhealth            # Verify installation
manim plugins -l             # List plugins

评论

支持 Markdown