Mathematical Animation Engines
A breadth-first survey of the open-source ecosystem for mathematical animation videos — the Manim family and the wider paradigm and building-block space around it — mapped to inform a future sparkles D library targeting both native video and interactive web output. Every claim ties to a primary source (a cited repository path or official-doc URL, usually with a verbatim quote), and the load-bearing geometry and timing facts are backed by runnable D probes that CI compiles and runs.
Last reviewed: July 11, 2026
This survey answers eleven questions:
- What is the reference architecture of a mathematical-animation engine — object model, animation system, rendering, typesetting, encoding? → Manim Community (+ scene-graph, text-pipeline, caching) and ManimGL
- How is time expressed across engines — play-loop, generator, pure frame function, reactive, GUI timeline? → the engines + concepts § execution models
- Why is the Bézier basis (quadratic vs cubic) load-bearing, and how does the conversion cost fall? → scene-graph, ManimGL,
bezier-eval.d - How do the web-native engines differ in model and rendering surface? → Motion Canvas, Remotion, Theatre.js
- What does a reactive/observable plotting model contribute? → Makie.jl
- What does immediate-mode creative-coding look like? → nannou; and a Cairo frame-function layer? → Javis.jl
- What does a from-scratch native engine (the closest analog to a D one) actually do? → MathAnimation
- What is the declarative-diagramming alternative to the imperative Mobject model? → Penrose, Bluefish, TikZ/PGF, Asymptote, CeTZ, MetaPost
- Which 2D rasterizers could a D engine bind, and at what cost? → Rendering Backends
- How does mathematical notation become vector outlines, and how do frames become video? → Math Typesetting, Video Encoding
- Where does Sparkles stand, and what should it build? → Baseline + comparison delta → Animation Engine Proposal
The eight axes
Every deep-dive is analysed against the same spine, so the catalog is comparable; where an axis does not apply, the page says so, because the absence of a capability is itself a finding. Defined once in concepts:
| # | Axis | # | Axis |
|---|---|---|---|
| 1 | Object & scene model | 5 | Output & encoding |
| 2 | Animation & timing | 6 | Interactivity, preview & authoring |
| 3 | Rendering & rasterization | 7 | Extensibility & API surface |
| 4 | Typesetting & text | 8 | Determinism, caching & performance |
Master catalog
| Subject | What it is | Category | Paradigm | Link |
|---|---|---|---|---|
| Concepts | the survey's shared vocabulary | — | — | concepts.md |
| Manim Community | the reference engine (Cairo default, cubic) | engine | imperative | manim-community/ |
| ManimGL | 3Blue1Brown's OpenGL-only original (quadratic) | engine | imperative | manimgl.md |
| Motion Canvas | TS generator/play-head + editor (Canvas2D) | engine | generator | motion-canvas.md |
| Remotion | React "video = pure frame function" | engine | pure-frame | remotion.md |
| Theatre.js | keyframe-timeline toolkit driving any renderer | engine (seq.) | GUI timeline | theatre-js.md |
| Javis.jl | Julia frame-function on Luxor/Cairo | engine | imperative | javis.md |
| Makie.jl | Julia GPU plotting, Observables reactive | engine | reactive | makie.md |
| nannou | Rust immediate-mode wgpu creative-coding | engine | immediate | nannou.md |
| MathAnimation | C++ from-scratch native engine + editor | engine | imperative | mathanimation.md |
| Penrose | diagrams by numerical constraint optimization | diagramming | declarative | penrose.md |
| Bluefish | relational diagramming (local propagation) | diagramming | declarative | bluefish.md |
| TikZ / PGF | the TeX-native vector language | diagramming | declarative | tikz.md |
| Asymptote | descriptive vector language with 3D | diagramming | descriptive | asymptote.md |
| CeTZ | TikZ-for-Typst, rendered by the Typst compiler | diagramming | declarative | cetz.md |
| MetaPost | Hobby's equation-solved-points origin | diagramming | declarative | metapost.md |
| Rendering Backends | Cairo/Blend2D/Vello/Skia/… rasterizers | building block | — | rendering-backends/ |
| Math Typesetting | LaTeX→dvisvgm / MathJax / Typst / HarfBuzz | building block | — | math-typesetting.md |
| Video Encoding | ffmpeg / libav / GStreamer / SVT-AV1 | building block | — | video-encoding.md |
| Comparison | capability matrix + consensus + delta table | synthesis | — | comparison.md |
| Sparkles Baseline | the D monorepo's greenfield starting point | synthesis | — | sparkles-baseline.md |
| Engine Proposal | milestoned M1–M10 hybrid-engine design | design | — | animation-engine-proposal.md |
Taxonomies
By authoring paradigm
| Paradigm | Subjects |
|---|---|
| Imperative play-loop / frame-function | Manim CE, ManimGL, Javis, MathAnimation |
| Generator / play-head | Motion Canvas |
| Pure frame function | Remotion |
| Reactive / observable | Makie |
| GUI timeline / keyframe | Theatre.js |
| Immediate mode | nannou |
| Declarative constraint / relation / equation | Penrose, Bluefish, TikZ, Asymptote, CeTZ, MetaPost |
By rendering model
| Model | Subjects |
|---|---|
| CPU vector | Manim CE (Cairo), Javis (Luxor), Makie (CairoMakie), Cairo/Blend2D/resvg |
| GPU | ManimGL, Makie (GL/WGL), nannou, MathAnimation, Vello/Lyon/NanoVG/raylib/Skia |
| Web canvas / DOM | Motion Canvas, Remotion, Theatre.js |
| Vector document (PDF/PS/SVG) | TikZ, Asymptote, CeTZ, MetaPost |
| Optimizer-laid-out (renderer-agnostic) | Penrose, Bluefish |
By language / ecosystem
| Ecosystem | Subjects |
|---|---|
| Python | Manim CE, ManimGL |
| TypeScript / web | Motion Canvas, Remotion, Theatre.js, Penrose, Bluefish |
| Julia | Javis, Makie |
| Rust | nannou |
| C / C++ | MathAnimation |
| TeX / Typst family | TikZ, Asymptote, CeTZ, MetaPost |
By output target (maps to the hybrid D goal)
| Target | Subjects |
|---|---|
| Offline video file | Manim CE, ManimGL, Javis, Remotion, MathAnimation |
| Real-time native window | ManimGL, Makie (GLMakie), nannou, MathAnimation |
| Interactive web | Motion Canvas, Remotion, Theatre.js, Makie (WGLMakie) |
| Static vector figure | Penrose, Bluefish, TikZ, Asymptote, CeTZ, MetaPost |
Milestones
When the field's key capabilities landed. Coarse dates are [literature].
| When | What |
|---|---|
| ~1994 | MetaPost (Hobby) — equation-solved points + Hobby splines [literature] |
| ~2004–2005 | Asymptote and PGF/TikZ bring descriptive vector graphics to TeX [literature] |
| ~2009–2014 | MathJax then KaTeX — web math rendering [literature] |
| ~2015–2018 | 3Blue1Brown's manim authored then open-sourced; Makie.jl and nannou appear [literature] |
| 2020 | Manim Community fork formalised; Javis.jl; Penrose (SIGGRAPH) [literature] |
| ~2021–2023 | Remotion (React-as-video); Typst + CeTZ; Vello GPU vector; Motion Canvas public [literature] |
| ~2024–2026 | Bluefish (UIST '24) relational diagramming; nannou 0.20 Bevy rewrite; Typst math + wasm mature [literature] |
| 2026-07-11 | This survey's **Last reviewed:** date |
The runnable probes
Dependency-free dub single-file programs under examples/; CI compiles and runs each (ci --example-files). They ground the survey's geometry and timing claims in code.
| Probe | Demonstrates | Backs |
|---|---|---|
| bezier-eval.d | quadratic vs cubic; exact quad→cubic elevation + the one-way fit cost | scene-graph, ManimGL |
| rate-functions.d | smootherstep vs the community sigmoid smooth; lag_ratio stagger | concepts § easing |
| affine-transform.d | 3×3 compose = right-to-left composition; non-commutativity | concepts § affine |
| frame-capture.d | software framebuffer readback → checksum (the render→encode interface) | video-encoding |
Quick navigation
Suggested reading paths
- "I'm designing the Sparkles animation engine" — concepts → Manim Community (+ scene-graph, text-pipeline, caching) → ManimGL (geometry contrast) → Rendering Backends → Math Typesetting → Video Encoding → Comparison (matrix + delta) → Baseline → Proposal; add Motion Canvas/Remotion before the web/wasm target decision.
- "I want the web/interactive (wasm) target" — Motion Canvas → Remotion → Theatre.js → rendering-backends § GPU → Comparison.
- "I want the native video target" — Manim Community → MathAnimation → nannou → rendering-backends § CPU → Video Encoding → Comparison.
- "Declarative / constraint-first authoring" — Penrose → Bluefish → MetaPost → concepts § declarative layout.
- "How does math text become shapes?" — Math Typesetting → text-pipeline → concepts § glyph outlines.
- Vocabulary lookup — concepts.md.
Sources
Each deep-dive carries its own Sources section with the primary references behind its claims (repository paths pinned by commit, official-doc URLs, and papers). The four probes are the survey's own CI-run evidence; internal claim-by-claim grounding ledgers are kept under grounding/ (not published).