manim
Manim animations
Use Manim Community Edition (CE), not manimgl / manimlib, unless the user explicitly requests that engine. Preserve an existing project's engine and dependency constraints; migration is a separate choice.
This edition targets ManimCE 0.22.x, Python 3.11+. Check python --version and python -m manim --version in the project's environment before writing version-sensitive code. For an older project, read the matching official docs rather than silently upgrading it. See setup and migration for installation, optional math backends, output changes, and troubleshooting.
Workflow
- Establish the explanation: what changes over time, what the viewer should understand, and the requested output (video/GIF/still, duration, aspect ratio, language). Infer sensible defaults for unspecified presentation choices; ask only when the answer changes the work materially.
- Before coding a new animation or improving its appearance, read visual direction. Choose a focal object and sketch a short shot list: question, visible action, insight, timing. Make the changing geometry carry the explanation; use captions to support it. Use explicit labels as well as color to convey state. For object transfers, continuous plots, causal flows, timing choices or portrait composition, read the matching animation craft recipe. Choose palette/type and motion rules for this subject; keep a stable identity for each tracked item.
- Write a runnable scene in the user's project, keeping output media separate from source. Use public scene APIs. Configure resolution, renderer, and output before constructing a scene; use CLI flags or
tempconfigrather than changing global config aftersuper().__init__(). - Render a low-quality video first. Inspect opening, intermediate, and final frames, and review transitions for pacing and semantic correctness. Check essential labels at the intended display width, not only in enlarged frames. A last-frame PNG or a successful command alone does not verify an animation. Fix clipping, unreadable labels, overlaps, wrong states, and unexpected jumps before increasing quality.
- Render the requested artifact and verify it exists, decodes, and has the intended dimensions, duration, and format. Deliver the source path, artifact path, exact render command, environment version, and any verification limits. Do not claim visual acceptance when only syntax or rendering was checked.
For a blog embed, a short 16:9 MP4 is a reasonable starting point; GIF is useful when required but can be larger and less efficient. Follow the user's duration and style rather than imposing a fixed length or banning titles.