Command Palette

Search for a command to run...

Назад к скиллам
скилл № 20621

manim

This skill should be used when the user asks to "make a math animation", "animate an equation", "use Manim", "make a 3Blue1Brown-style video", "plot or…

БесплатноБез исполняемых скриптов
iart-aiот iart-ai★ 31 звезда на GitHub

Установить manim в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Manim (Programmatic Math Animation)

Manim (Mathematical Animation Engine, Community Edition) renders explanatory math/physics/CS videos from Python — the engine behind 3Blue1Brown-style motion. Every scene is declarative: you build vector objects, play timed animations over them, and render a deterministic MP4/GIF from the CLI. Best-in-class for moving equations, transforming formulas, animated graphs, and geometric intuition.

When to use

  • Animate an equation: write it on, transform it term-by-term, highlight substitutions.
  • Visualize a function/graph: axes, plotted curves, a dot tracing the curve, area under it.
  • Geometric or conceptual explainers: a proof unfolding, vectors, transformations, number lines.
  • 3D math: surfaces, parametric curves, a camera orbiting a shape.
  • Any "show the math moving" educational clip rendered to MP4/GIF.

Not the tool for UI motion, social/marketing video, or data-from-CSV business charts — use the web-animation or Remotion video skills for those. Manim's edge is mathematical typesetting and intuition.

Setup & render

pip install manim          # needs Python 3.9+, ffmpeg, and a LaTeX distribution (for Tex/MathTex)
manim -pql scene.py SquareToCircle   # render one Scene class, preview at low quality

Render flags (the ones that matter):

  • -q l|m|h|k — quality: low (fast iteration) → 4K. -ql while building, -qh to ship.
  • -p — play when done; -o name — output filename; --format=gif — render a GIF (README demos).
  • -s — save the last frame as a PNG (no video encode — the verification lever, see below).
  • -n a,b — render only animation index range a..b (stop early to inspect a moment).
  • Output lands in media/videos/<file>/<quality>/<Scene>.mp4 (and media/images/... for -s).

The three building blocks

Everything is Scenes (orchestration) acting on Mobjects (objects) via Animations (timed change).

from manim import *

class SquareToCircle(Scene):
    def construct(self):                 # ALL animation code lives in construct()
        sq = Square().set_fill(BLUE, opacity=0.5)
        self.play(Create(sq))            # animate it drawing on
        self.play(sq.animate.rotate(PI / 4))
        self.play(Transform(sq, Circle().set_fill(PINK, opacity=0.5)))
        self.wait(0.5)                   # hold

Mobjects — vector objects (Circle, Square, Rectangle, Line, Dot, Polygon, Axes, Text, MathTex).

  • Position: .shift(UP*2) (relative), .move_to(ORIGIN) (absolute), .next_to(other, RIGHT, buff=0.5), .align_to(other, LEFT). Directions are constants: UP DOWN LEFT RIGHT ORIGIN UL UR DL DR.
  • Style: .set_fill(color, opacity), .set_stroke(color, width), .set_color(YELLOW). Colors: BLUE RED GREEN YELLOW WHITE + BLUE_E, etc.
  • self.add(m) shows instantly (no animation); self.remove(m). Later-added objects render on top.

Animations — interpolate a mobject's state over run_time seconds (default 1s).

  • Construction: Create, Write (for text/Tex), DrawBorderThenFill, FadeIn, FadeOut, GrowFromCenter.
  • Change: Transform(a, b) (morph a into b, keep a), ReplacementTransform(a, b) (swap a for b), Rotate, Indicate, Circumscribe, Wiggle.
  • .animate syntax — animate any method call: self.play(sq.animate.shift(UP).set_fill(RED)). Chains apply together.
  • Play several at once: self.play(Create(a), FadeIn(b), run_time=2).

Timing & easing — run_time= sets duration; rate_func= sets the easing curve (smooth is the default — ease-in-out; also linear, rush_into, rush_from, there_and_back, ease_out_bounce). Stagger a group with LaggedStart(*anims, lag_ratio=0.2). The motion-craft rules from the motion-design-skills pack (animation-principles: the eye forgives a slow end less than a slow start; reserve linear for loops; stagger groups) apply here — Manim just expresses them as rate_func + LaggedStart.

Math, text & equations

Text/MarkupText (Pango, no LaTeX) for labels; Tex/MathTex (LaTeX, raw strings) for typeset math. Animate equations with Write and morph between them with TransformMatchingTex. Full recipes — substring coloring, {{ }} isolation, term-by-term transforms, LaTeX preamble — in references/math-and-text.md.

Graphs, plotting & updaters

Axes + ax.plot(lambda x: ...) for functions; ax.c2p(x, y) maps math coords → screen. Drive live values with ValueTracker + always_redraw/add_updater so dependent mobjects recompute every frame (a dot riding a curve, a counter, a moving tangent). See references/graphs-and-updaters.md.

3D & moving camera

ThreeDScene + set_camera_orientation(phi=, theta=), ThreeDAxes, Surface, begin_ambient_camera_rotation(); MovingCameraScene + self.camera.frame.animate... for 2D camera pushes/follows. See references/3d-and-camera.md.

Deliver & verify (rendered frame → MP4)

Packaged helper (scripts/): til

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • README.md
  • references/3d-and-camera.md
  • references/graphs-and-updaters.md
  • references/math-and-text.md

FAQ

Что делает скилл manim?

This skill should be used when the user asks to "make a math animation", "animate an equation", "use Manim", "make a 3Blue1Brown-style video", "plot or animate a graph/function", "visualize a math/physics/CS concept", "morph one formula into another", "animate a geometric proof", or "render a math explainer". Covers Manim Community Edition — Scenes, Mobjects, animations, LaTeX/MathTex, graphs, updaters/ValueTracker, 3D, and rendering to MP4/GIF via the CLI.

Как установить скилл manim?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл manim запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить manim с