Skip to main content
rule CX Codex

transform-animations — Claude Code rule: morphing objects in ManimGL

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.

AGPL-3.0 ★ 78,316 updated 2026-10-24

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/transform-animations.md
Open on GitHub

What transform-animations 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.

What it helps with

  • 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 for the agent

  • 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

How to install transform-animations

Manually: put the files in place

.claude/rules/transform-animations.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about transform-animations

How do I install transform-animations in Claude Code?

Copy the rule file to .claude/rules/transform-animations.md in your project root. Claude Code will load it automatically the next time you open a Python file. Other IDEs use different paths: .cursor/rules/ for Cursor, .clinerules/ for Cline.

What does transform-animations do?

The rule gives Claude Code and Codex context about ManimGL transformations — methods for morphing shapes, transforming equations, rotating and scaling objects. It shows syntax and explains when to use Transform, ReplacementTransform, or TransformMatchingTex.

What's the difference between Transform and ReplacementTransform?

Transform changes how the source object looks but keeps it in the scene under the same variable. ReplacementTransform removes the source and puts the target in its place — after the animation, only the target object remains. Use Transform if you need to reference the original object later; use ReplacementTransform when you're done with the source.

Similar IDE rules

All IDE rules for AI and ML →

From the same set101

The whole set →
hacker-flip-3d hacker-flip-3d supplies guidelines for creating a 3D character flip animation with randomized glyph decoding. Helps build terminal and airport-style text reveals. CX Codex +1 ★ 78,316repo stars gemini-omni Generates short clips via gemini-omni-1.1-flash and edits them through follow-up prompts without re-generating. Each generation returns an interaction_id so the next call changes only what you specify. CX Codex +1 ★ 78,316repo stars discrete-text-sequence discrete-text-sequence — a rule for GSAP scenes where the terminal line swaps whole states instead of typing evenly: typos, backspaces, pasted chunks and holds. CX Codex +1 ★ 78,316repo stars animation-groups The animation-groups rule organizes ManimGL animations for parallel, sequential, or staggered playback. Use it when several scene elements need coordinated timing. CX Codex +1 ★ 78,316repo stars embedding embedding instructs your coding agent to debug ManimGL scenes interactively via IPython, letting you test object positions and animations without restarting the render. CX Codex +1 ★ 78,316repo stars vertical-spring-ticker vertical-spring-ticker is a rule for Claude Code and Codex that defines a slot-machine vertical ticker with additive GSAP spring physics. Each spring advances the stack one discrete step instead of a smooth scroll. CX Codex +1 ★ 78,316repo stars multi-phase-camera multi-phase-camera — a rule for animated web scenes: the camera moves through 2-3 zoom phases (pull-back, focus, push) with continuous micro-drift on top. For when a single linear zoom feels mechanical. CX Codex +1 ★ 78,316repo stars camera Reference rule for ManimGL CameraFrame controls. Helps write 2D pans, zoom sequences, and 3D view changes without syntax errors. CX Codex +1 ★ 78,316repo stars

Project sponsors

Companies that keep this analytics open