How 3b1b/manim works
ManimGL is a Python engine for programmatic explanatory animations. A user selects a scene through the command line; scene extraction loads and runs it, advancing mobjects through animations. The scene asks the camera to capture frames, which the renderer draws; playback and optional video output are handled through the window and scene writer. The map also includes the documented interactive workflow and the core shape, text, animation, configuration, and GPU-rendering layers. Relationships are limited to README statements and source-index references or excerpts; unsampled subsystems are represented at their enclosing paths.
Main entry points: scene.py Scene orchestration · vectorized_mobject.py Vector graphics · extract_scene.py Scene extraction · drawing.py Drawing commands
Components 22
Scene entry
- Scene extraction
manimlib/extract_scene.py - Module loading
manimlib/module_loader.py - Scene orchestration
manimlib/scene/scene.py - Interactive scenes
manimlib/scene/interactive_scene.py
Scene content
- Animation system
manimlib/animation/animation.py - Mobject model
manimlib/mobject/mobject.py - Geometric shapes
manimlib/mobject/geometry.py - Vector graphics
manimlib/mobject/types/vectorized_mobject.py - Text and TeX
manimlib/mobject/svg/text_mobject.py
Visual pipeline
- Camera capture
manimlib/camera/camera.py - Drawing commands
manimlib/renderer/drawing.py - GPU rendering
manimlib/renderer/gpu.py - Render pipeline
manimlib/renderer/pipeline.py - Shader sources
manimlib/renderer/shader_source.py
Playback and output
- Playback window
manimlib/window.py - Scene file writer
manimlib/scene/scene_file_writer.py
Shared foundations
- Runtime configuration
manimlib/config.py - Bezier geometry
manimlib/utils/bezier.py - Color utilities
manimlib/utils/color.py - Spatial utilities
manimlib/utils/space_ops.py - Type definitions
manimlib/typing.py
Other components
- Scene author
Connections 22
- Scene author → Scene extraction: selects scene
- Scene extraction → Module loading: loads module
manimlib/extract_scene.py - Scene extraction → Scene orchestration: runs scene
manimlib/extract_scene.py - Scene extraction → Interactive scenes: supports interactive
manimlib/extract_scene.py - Scene orchestration → Animation system: runs animations
manimlib/scene/scene.py - Scene orchestration → Mobject model: manages objects
manimlib/scene/scene.py - Scene orchestration → Camera capture: captures frame
manimlib/scene/scene.py - Scene orchestration → Scene file writer: writes output
manimlib/scene/scene.py - Scene orchestration → Playback window: polls events
manimlib/scene/scene.py - Mobject model → Vector graphics: supports vector objects
manimlib/mobject/mobject.py - Geometric shapes → Vector graphics: builds paths
manimlib/mobject/geometry.py - Camera capture → GPU rendering: uses GPU
manimlib/camera/camera.py - Camera capture → Drawing commands: uses renderer
manimlib/camera/camera.py - Drawing commands → GPU rendering: issues draw calls
manimlib/renderer/drawing.py - Drawing commands → Render pipeline: uses pipelines
manimlib/renderer/drawing.py - Drawing commands → Shader sources: loads shaders
manimlib/renderer/drawing.py - Playback window → Scene orchestration: drives playback
manimlib/window.py - Scene orchestration → Runtime configuration: reads settings
manimlib/scene/scene.py - Vector graphics → Bezier geometry: uses curves
manimlib/mobject/types/vectorized_mobject.py - Vector graphics → Color utilities: uses colors
manimlib/mobject/types/vectorized_mobject.py - Mobject model → Spatial utilities: uses spatial math
manimlib/mobject/mobject.py - Text and TeX → Vector graphics: builds vector text