# transform-animations

transform-animations — a rule that teaches Claude Code and Codex how to transform objects in ManimGL — from basic shape morphing to complex function-based transformations. Use it when writing Python animations of mathematical objects.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 78316 repo stars
- Author: calesthio
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/calesthio/OpenMontage/tree/HEAD/.agents/skills/manimgl-best-practices/rules/transform-animations.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/transform-animations

## What it does

This rule covers the core transformation methods in ManimGL: `Transform` changes an object's appearance without replacing it, `ReplacementTransform` swaps the source with the target, `TransformMatchingTex` morphs LaTeX expressions by matching substrings. It includes `TransformMatchingShapes` for morphing groups of shapes, `MoveToTarget` for animating to a target state, `FadeTransform` for crossfades, and rotation and scaling methods.

The rule provides examples for advanced operations: applying custom functions to coordinates (`apply_function`), transformations on the complex plane (`apply_complex_function`), and multi-step animation sequences. Each example shows the method signature, key parameters, and when to use each approach.

You need Python and ManimGL installed. The rule goes in `.claude/rules/` for Claude Code or `.cursor/rules/` for Cursor — the exact path depends on your IDE.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/transform-animations.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/transform-animations.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/transform-animations.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/transform-animations.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/transform-animations.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/calesthio/OpenMontage/tree/HEAD/.agents/skills/manimgl-best-practices/rules/transform-animations.md

## When to use it
- Morph one shape into another while keeping the original object reference
- Smoothly transform a mathematical formula by matching its parts across expressions
- Animate a transformation of grouped shapes based on their geometry
- Apply a custom mathematical function to an object's coordinates
- Sequentially change object properties: position, scale, and color

## Example prompts
- Transform a circle into a square using `ReplacementTransform`
- Use `TransformMatchingTex` on two equations that share variables
- Rotate a cube 90 degrees and then scale it by 2

## Similar
- [manim-explainer-animation](https://affpapa.org/en/nevibecode/skills/manim-explainer-animation.md) — skill · 157 installs
- [manimgl-best-practices](https://affpapa.org/en/nevibecode/skills/manimgl-best-practices.md) — skill · 2600 installs
- [manimce-best-practices](https://affpapa.org/en/nevibecode/skills/manimce-best-practices.md) — skill · 4800 installs
- [manim](https://affpapa.org/en/nevibecode/skills/manim.md) — skill · 1400 installs
- [roblox-animations](https://affpapa.org/en/nevibecode/skills/roblox-animations.md) — skill · 1000 installs
- [knot-theory-educator](https://affpapa.org/en/nevibecode/skills/knot-theory-educator.md) — skill · 182 installs

From the same set: [calesthio/openmontage](https://affpapa.org/en/nevibecode/by/calesthio/openmontage.md) — 101 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
