Communitygithub.com

Math Animation Studio

Create, revise, render, and review deterministic Canvas and LaTeX mathematics or theoretical physics explainers. Use for mathematical animations, theoretical physics visualizations, formula effects, source rewrites, or editable teaching animations based on a video reference. Includes eleven examples for geometry, algebra, mathematical physics, and relativity. Not for recovering an author's original source or editing live-action footage.

What is Math Animation Studio?

Math Animation Studio is a specialized skill for AI agents designed to help developers and researchers create precise, deterministic animations for mathematics and theoretical physics. It leverages Canvas and LaTeX to build explainer animations that are editable, seekable, and focused on pedagogical clarity. The skill supports platforms like Claude Code and similar agentic environments, providing a structured workflow: from defining observable beats and intermediate states, to modeling formulas in pure functions, to rendering with timedrawing functions. It includes eleven reference scenes covering geometry, algebra, mathematical physics, and relativity, and emphasizes evidence checking over simple export quality. The skill is ideal for creating teaching animations, reconstructing conceptual explanations from video references, or rewriting animation source code—but explicitly not for recovering original source code or editing live footage.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/keindex/math-animation-studio/tree/HEAD

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does Math Animation Studio do?

Use an existing animation stack when the user has one. Otherwise copy assets/starter/ to a working directory and adapt the nearest example. Do not edit the installed template in place. For model selection and known simplifications, read the eleven scene recipes. For setup, the scene contract and render checks, read build and review.

  1. Define what should become evident. Choose a concrete object, operation, and observable result for each beat. If starting from reference footage, record what is visible and when; keep assumptions separate. A thematic reconstruction is not recovered source or a frame match.
  2. Design the intermediate states. Keep the same object, coordinates, labels or color when a concept carries across cuts. Show the operation changing the diagram, then let the result hold. Good anchors in this collection: a falling object's position becomes a worldline; fixed clocks start together and accumulate a difference; signed products on a common zero line accumulate to zero.
  3. Model before drawing. Put formulas and invariants in pure functions that can be tested. Label units, conventions, approximations and any exaggerated scales. Call out a qualitative analogy where the geometry or dynamics are not actually solved. A formula displayed next to a diagram should quantify something the viewer can point to in it.
  4. Make the timeline seekable. Use elapsed seconds, draw(stage, t) and fixed coordinates. Recompute geometry from t; do not accumulate simulation state across frames. For expensive integration, precompute a fixed path and sample it by t. Set each scene's drawing state independently, including its camera.
  5. Check the evidence, not just the export. Test the important identity or sign. Inspect actual-size frames at the beginning, at the key change, and at the conclusion, then check a moving excerpt when timing matters. Keep earlier exports separate. Compare by teaching beat unless the same model and timing are aligned; do not infer fidelity from image similarity alone.

Publish only the independently written code and assets authorized for distribution. Reference videos, OCR, traced frames and local paths do not belong in this starter or its exports.

Related Skills