Documentation

Supported features with runnable examples. Previews are lazy and only compile when you click Render preview, so opening docs does not trigger a flood of compile requests.

Core Objects

  • - Circle, Square, Rectangle, Line, Arrow, Dot, Polygon, RegularPolygon
  • - Text, Tex, MathTex
  • - ImageMobject, SVGMobject
  • - Group and VGroup

Animation Primitives

  • - Create, FadeIn, FadeOut, Write, Unwrite, GrowFromCenter, GrowFromPoint, ShrinkToCenter, Uncreate
  • - Rotate, Shift, MoveTo, Scale, ScaleInPlace
  • - Transform, ReplacementTransform, TransformFromCopy, ClockwiseTransform, CounterclockwiseTransform
  • - MoveToTarget, ApplyMethod, MoveAlongPath, ApplyPointwiseFunction
  • - AnimationGroup, LaggedStart, LaggedStartMap

Scene Features

  • - Camera frame animate, move_camera, zoom_camera
  • - add_fixed_in_frame_mobjects for HUD/static overlays
  • - Updaters via add_updater / clear_updaters
  • - Voiceovers, captions, background audio, image assets
  • - Compilation diagnostics with line and column mapping

Basics

Basics

Create + FadeIn + FadeOut

Entry/exit primitives for basic scene staging.

scene = Scene(duration=4, width=640, height=360, fps=30)
circle = Circle(radius=1.25, color=BLUE).shift(LEFT * 1.9)
square = Square(side_length=2.2, color=GREEN).shift(RIGHT * 1.9)
scene.play(Create(circle), FadeIn(square), run_time=1.5)
scene.play(FadeOut(square), run_time=1)
scene.wait(1)
Create + FadeIn + FadeOut preview

Transforms

Transforms

.animate chain

Combine shift, rotate, and scale in one motion.

scene = Scene(duration=3, width=640, height=360, fps=30)
rect = Rectangle(width=5.8, height=2.1, color=YELLOW)
scene.add(rect)
scene.play(rect.animate.shift(UP * 0.8).rotate(PI / 6).scale(1.12), run_time=2)
scene.wait(1)
.animate chain preview
Transforms

Transform + ReplacementTransform

Morph one shape into another.

scene = Scene(duration=4, width=640, height=360, fps=30)
a = Circle(radius=1.3, color=BLUE)
b = Square(side_length=2.4, color=GREEN)
c = Rectangle(width=6, height=2.1, color=ORANGE)
scene.add(a)
scene.play(Transform(a, b), run_time=1.5)
scene.play(ReplacementTransform(a, c), run_time=1.5)
scene.wait(1)
Transform + ReplacementTransform preview

Groups

Groups

LaggedStart on VGroup

Stagger timing to create rhythm.

scene = Scene(duration=4, width=640, height=360, fps=30)
g = VGroup(
    Square(side_length=1.5).shift(LEFT * 2.3),
    Square(side_length=1.5),
    Square(side_length=1.5).shift(RIGHT * 2.3)
)
scene.add(g)
scene.play(LaggedStart(
    g[0].animate.shift(UP * 1.1),
    g[1].animate.shift(UP * 1.1),
    g[2].animate.shift(UP * 1.1),
    lag_ratio=0.2
), run_time=2)
scene.wait(1)
LaggedStart on VGroup preview

Path Motion

Path Motion

MoveAlongPath

Drive a mobject over a geometric path.

scene = Scene(duration=4, width=640, height=360, fps=30)
path = Circle(radius=2.7, color=GREY_B)
dot = Dot(radius=0.18, point=LEFT * 2.7, color=RED)
scene.add(path, dot)
scene.play(MoveAlongPath(dot, path), run_time=2, rate_func=there_and_back)
scene.wait(1)
MoveAlongPath preview

Text

Text

Write + Unwrite

Text-specific animation helpers.

scene = Scene(duration=4, width=640, height=360, fps=30)
title = Text("Manim Web Docs", font_size=74, color=BLUE)
scene.play(Write(title), run_time=1.5)
scene.wait(1)
scene.play(Unwrite(title), run_time=1)
Write + Unwrite preview

Camera

Camera

move_camera + zoom_camera

Programmatic camera movement and zoom helpers.

scene = Scene(duration=4, width=640, height=360, fps=30)
left = Dot(radius=0.2, point=LEFT * 4.2, color=BLUE)
right = Dot(radius=0.2, point=RIGHT * 4.2, color=YELLOW)
scene.add(left, right)
scene.move_camera(position=RIGHT * 2.5, run_time=1, rate_func=linear)
scene.zoom_camera(zoom=2.2, run_time=1)
scene.wait(1)
move_camera + zoom_camera preview
Camera

add_fixed_in_frame_mobjects

HUD elements stay fixed while camera moves.

scene = Scene(duration=4, width=640, height=360, fps=30)
world = NumberPlane(
    x_range=[-8, 8, 1],
    y_range=[-5, 5, 1],
    x_length=16,
    y_length=10
)
hud = Text("HUD", color=YELLOW, font_size=54).to_corner(UL)
scene.add(world)
scene.add_fixed_in_frame_mobjects(hud)
scene.play(scene.camera.frame.animate.shift(RIGHT * 3), run_time=1.5)
scene.wait(1)
add_fixed_in_frame_mobjects preview

Continuous Motion

Continuous Motion

add_updater + clear_updaters

Continuous motion with per-frame updates.

scene = Scene(duration=3, width=640, height=360, fps=30)
dot = Dot(radius=0.2, point=LEFT * 3.8, color=RED)
scene.add(dot)
dot.add_updater(lambda m, dt: m.shift(RIGHT * 2.2 * dt))
scene.wait(1)
dot.clear_updaters()
scene.wait(1)
add_updater + clear_updaters preview

Graphs

Graphs

Axes + line graph points

Coordinate transforms with graph primitives.

scene = Scene(duration=4, width=640, height=360, fps=30)
axes = Axes(x_range=[0, 6, 1], y_range=[0, 4, 1], x_length=10.5, y_length=5.8)
line = Line(axes.c2p(0, 0), axes.c2p(5, 3), color=GREEN)
label = Text("y = 0.6x", font_size=36).next_to(line, UP)
scene.play(Create(axes), run_time=1)
scene.play(Create(line), Write(label), run_time=1.5)
scene.wait(1)
Axes + line graph points preview