Examples

Runnable examples for the currently supported feature set. Previews are lazy and only compile when you click Render preview, so opening this page does not trigger a flood of compile requests.

Coverage

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
Active Section
Styling
2 visibleOpen cards when needed
Browse one category at a time instead of loading a long mixed gallery.
Styling

Z-order via add order

Order of add() controls stacking.

scene = Scene(fps=30, width=640, height=360)circle = Circle().shift(LEFT).set_stroke(color=GREEN, width=20)square = Square().shift(UP).set_fill(YELLOW, opacity=1.0)triangle = Triangle().shift(RIGHT).set_fill(PINK, opacity=0.5)scene.add(triangle, square, circle)scene.wait(1.5)
Z-order via add order preview
Styling

set_stroke / set_fill

Change stroke and fill on multiple shapes.

scene = Scene(fps=30, width=640, height=360)circle = Circle().shift(LEFT)square = Square().shift(UP)triangle = Triangle().shift(RIGHT)circle.set_stroke(color=GREEN, width=20)square.set_fill(YELLOW, opacity=1.0)triangle.set_fill(PINK, opacity=0.5)scene.add(circle, square, triangle)scene.wait(1)
set_stroke / set_fill preview