Manim (3Blue1Brown) 🎬

Manim is an animation engine for explanatory math videos. It’s used to create precise animations programmatically, as seen in the videos at 3Blue1Brown - 3b1b/manim / HN

Notes see the Community Edition for starter

  • Manim, or ManimCE refers to the community maintained version of the library.
  • ManimGL is the latest released version of the version of the library developed by Grant “3b1b” Sanderson. It has more experimental features and breaking changes between versions are not documented.
  • ManimCairo is the name that is sometimes used for the old, pre-OpenGL version of manimgl.

caption

see also

  • Ego and Math - Stanford Math Department Commencement Speech 2023

# Setup

see Fully working Manim setup using nix + uv

# Why use the OpenGL renderer? ⮺

Manim Live Rendering Options

# VSCode ⮺

Alternatives

# Tutorials ⮺

  • How I Animate 3Blue1Brown / HN
  • [Manim tutorial Introduction: What is Manim? (2022 Update)](https://www.youtube.com/watch?v=ENMyFGmq5OA&list=PL2B6OzTsMUrwo4hA3BBfS7ZR34K361Z8F)

# Hello World ⮺

$ manim init project my-project --default
from manim import *


class CreateCircle(Scene):
    def construct(self):
        circle = Circle()  # create a circle
        circle.set_fill(PINK, opacity=0.5)  # set the color and transparency
        self.play(Create(circle))  # show the circle on screen

# Example

# Mobjects ⮺

Mobjects are the basic building blocks for all manim animations. Each class that derives from Mobject represents an object that can be displayed on the screen.

# VGroup ⮺

a VGroup (short for Vectorized Group) is a container that let you “bundle” shape together so you can move, scale, or animate them all at once:

  • Holds multiple vectorized mobjects (like shapes, text, lines)
  • Lets you apply transformations to the whole group
  • Keeps relative positioning between its elements
from manim import *

class VGroupExample(Scene):
    def construct(self):
        circle = Circle()
        square = Square().shift(RIGHT)
        triangle = Triangle().shift(LEFT)

        group = VGroup(circle, square, triangle)

        self.play(Create(group))
        self.play(group.animate.shift(UP))

# Scene ⮺

The Scene class is the connective tissue of manim. Every mobject has to be added to a scene to be displayed, or removed from it to cease being displayed. Every animation has to be played by a scene, and every time interval where no animation occurs is determined by a call to wait().

# Animation

# Graph

Written on November 7, 2020, Last update on April 25, 2026
math animation 3blue1brown vscode