Manim Web Documentation
Learn the runtime from simple 2D scenes to camera-driven 3D compositions, then use the generated reference for exact signatures, methods, constants, and compatibility details.
Learning Path
Start with 2D scene composition, then add motion and camera logic. The examples library is organized so you can learn the runtime in that order.
Start With 2D Scene Basics
Learn object creation, placement, styling, and the `Scene` timeline model before layering on animation.
Add Motion And State
Work through `play()`, transforms, `animate`, `ValueTracker`, and `always_redraw` patterns that power most interactive scenes.
Move The Camera
Use frame motion in 2D scenes and camera orientation changes in `ThreeDScene` when layout alone is not enough.
Build 3D Scenes
Combine `ThreeDScene`, 3D primitives, overlays, and camera movement for object demos and explainer scenes.
Use The Reference
Drop into the generated module/class/method reference below when you need exact signatures or supported compatibility details.
Important Runtime Notes
Scene for flat compositions. Use ThreeDScene when camera orientation and projected z depth should affect rendering.set_camera_orientation() establishes the initial 3D view immediately, while move_camera() animates from the current camera state.ValueTracker, add_updater(), and always_redraw() are supported for counters, graphs, and motion systems.Text, Tex, MathTex, DecimalNumber, Code, and table cells use vector metrics so layout stays stable during animation.Documentation built from the compiler’s generated Python API surface
This view is grouped automatically from the runtime reference data. Modules stay separate, classes are ordered from base types toward more specialized subclasses, and every constant, function, class, and method gets a stable anchor for direct linking.
Module Index
Generated from the available modules in the runtime bundle.
Class Index
Automatically ordered from lower inheritance depth to more specialized subclasses.
Animation Proxy class.
Context manager for syncing background audio timing
3D camera frame wrapper exposed by ``ThreeDScene.camera.frame``.
Lightweight color wrapper used by compatibility properties.
Circular cone with a capped base.
Axis-aligned cube centered at the local origin.
Circular cylinder with top and bottom caps.
Small filled 3D marker positioned at a single point.
Straight 3D segment between explicit start and end points.
Base class for drawable objects in the Manim Web runtime.
General 3D mesh built from explicit vertices and polygon faces.
Axis-aligned rectangular prism centered at the local origin.
Top-level animation container that owns the timeline and exported state.
Triangulated sphere generated from latitude and longitude samples.
Sampled parametric surface over a rectangular ``(u, v)`` domain.
Wireframe mesh extracted from a sampled surface.
Three-dimensional Cartesian axes with coordinate conversion helpers.
Perspective camera wrapper exposed by ``ThreeDScene.camera``.
Donut-shaped surface parameterized by major and minor radii.
Context manager for syncing animations with voiceover timing
Circular arc matching Manim's Arc constructor shape semantics.
Line segment with an arrow tip oriented toward the end point.
3D line segment with an arrow tip at the end point.
Coordinate axes with configurable ranges and visual lengths.
Brace class.
Circular outline or filled shape with Manim-style defaults.
Shared-layout code block that preserves Manim-style constructor options.
Convex Hull3 D class.
Cubic Bezier curve defined by four control points.
Decimal Number class.
Regular dodecahedron convenience polyhedron.
Function Graph class.
Container that groups child mobjects without changing their types.
Regular icosahedron convenience polyhedron.
Raster image loaded from the user workspace or scene asset map.
Implicit Function class.
Straight segment defined by explicit start and end points.
Mobject class.
MovingCameraScene scene class.
Number Line class.
Regular octahedron convenience polyhedron.
Curve generated by sampling a callable or expression over ``t_range``.
Alias of :class:`Surface` kept for Manim API compatibility.
Polar coordinate plane with radial and angular labeling helpers.
Polygon class.
Axis-aligned rectangle parameterized by width and height.
Regular Polygon class.
Square mobject sampled densely for smoother morphing.
Regular tetrahedron convenience polyhedron.
LaTeX-like text mobject represented as a single tex string.
Plain text mobject rendered with the runtime text renderer.
3D scene with perspective camera controls compatible with Manim-style APIs.
Triangle class.
Numeric container used to drive animations and redraw callbacks.
VMobject class.
Scene subclass with reusable voiceover helpers for narrated 2D timelines.
Scene variant that renders a second zoomed inset of the main camera.
Angle class.
Annular Sector class.
Circular arc spanning two points using Manim's constructor rules.
Arc Polygon class.
Arrow Circle Filled Tip class.
Arrow Circle Tip class.
Arrow Square Filled Tip class.
Arrow Square Tip class.
Filled triangular arrow tip sized with Manim-like defaults.
Brace Between Points class.
Convex Hull class.
Dashed Line class.
Filled circular point marker.
Line segment with arrow tips at both the start and end points.
Elbow class.
Ellipse class.
Integer-valued number mobject with animate/set_value support.
Text that accepts simple inline markup tags and strips them for rendering.
Math-oriented ``Tex`` variant that accepts multiple fragments.
Cartesian grid plane with vector and coordinate-label helpers.
Polygram class.
Regular Polygram class.
Right Angle class.
Rectangle variant with rounded corners.
Sector class.
Star class.
Rectangle that surrounds a mobject - exports as 'Rectangle' type
SVG-backed image mobject.
Tangent Line class.
Continuously trace points returned by a callback over time.
Underline class.
Vector class.
Arrow that starts at the origin and points along a direction vector.
Group variant used for vectorized collections of mobjects.
ThreeDScene variant with the same reusable voiceover helpers as VoiceoverScene.
Annotation Dot class.
Annulus class.
Arc Brace class.
Arc Polygon From Arcs class.
Arrow Tip class.
Arrow Triangle Tip class.
Filled rectangle sized to sit behind another mobject.
Brace Label class.
Vertical stack of TeX items with bullet dots, mirroring Manim's helper.
Simple diagonal cross mark used for highlights and failure indicators.
Curved Arrow class.
Cutout class.
Difference class.
Exclusion class.
Intersection class.
Labeled Dot class.
Minimal matrix helper that arranges entries in rows with brackets.
Vertical stack of text lines with alignment controls.
Stealth Tip class.
Simple table made of rectangle/text cells with ``get_rows()`` compatibility.
Tangential Arc class.
Minimal title helper aligned to the top edge like Manim's Title.
Union class.
Brace Text class.
Curved Double Arrow class.
Function Index
Direct links to generated top-level functions across the available modules.
Add Text Letter By Letter function.
Creates an object that is redrawn every frame by calling func(). The returned object is tagged and given an updater that copies fresh geometry/state every frame, mirroring Manim's always_redraw behavior.
Return the polar angle of a 2D vector in radians.
Run multiple animations together as a grouped unit.
Animate a mobject toward the result of applying a callback to it.
Apply Method animation helper.
Apply Pointwise Function animation helper.
Apply Pointwise Function To Center animation helper.
Approximate a wave highlight by sliding a temporary colored copy.
Arccos math helper.
Approximate a blink with a fast temporary overlay flash.
Bounce easing function.
Create a brace between two points
Ceil function.
Draw and fade a temporary outline around a target mobject.
Clockwise Transform animation helper.
Interpolate a list of colors into a gradient of the requested length.
Cos math helper.
Counterclockwise Transform animation helper.
Animate a mobject as if it is being drawn into the scene.
Cyclic Replace animation helper.
Degrees to rad math helper.
Double smooth easing function.
Ease in easing function.
Ease in back easing function.
Ease in bounce easing function.
Ease in circ easing function.
Ease in cubic easing function.
Ease in elastic easing function.
Ease in expo easing function.
Ease in out easing function.
Ease in out back easing function.
Ease in out bounce easing function.
Ease in out circ easing function.
Ease in out cubic easing function.
Ease in out elastic easing function.
Ease in out expo easing function.
Ease in out quad easing function.
Ease in out quart easing function.
Ease in out quint easing function.
Ease in out sine easing function.
Ease in quad easing function.
Ease in quart easing function.
Ease in quint easing function.
Ease in sine easing function.
Ease out easing function.
Ease out back easing function.
Ease out bounce easing function.
Ease out circ easing function.
Ease out cubic easing function.
Ease out elastic easing function.
Ease out expo easing function.
Ease out quad easing function.
Ease out quart easing function.
Ease out quint easing function.
Ease out sine easing function.
Elastic easing function.
Exponential decay easing function.
Animate a mobject from invisible to visible.
Animate a mobject from visible to invisible.
Approximate Manim's flash burst with a temporary star marker.
Floor function.
Spotlight a target with a temporary circular focus ring.
Get image asset function.
Get images map function.
Animate an arrow-like mobject growing into view.
Grow From Center function.
Grow From Point function.
Overlay a short pulse highlight on a mobject.
Linearly interpolate between two colors.
Run multiple animations with a staggered start offset.
Map an animation factory across a group and stagger the results.
Linear easing function.
Lingering function.
Maintain Position Relative To function.
Animate ``obj`` along sampled points from a path-like mobject.
Animate a move to a target point.
Move To Target function.
Not quite there function.
Radians math helper.
Transform one mobject into another while conceptually replacing it.
Animate a rotation transform, optionally around ``about_point``.
Rotating function.
Running start function.
Rush from easing function.
Rush into easing function.
Animate a scale transform, optionally around ``about_point``.
Scale In Place function.
Animate a translation by a vector.
Sweep a temporary highlighted copy across an existing mobject.
Sweep a temporary border around a target mobject.
Shrink To Center function.
Sin math helper.
Slow into easing function.
Smooth easing function.
Sqrt math helper.
Squish rate func function.
Succession function.
Surrounding Rectangle With Buffer function.
Tan math helper.
There and back easing function.
There and back with pause function.
Morph one mobject or group into another target state.
Transform From Copy function.
Approximate Manim's shape-matching transform with a regular transform.
Transform Matching Strings function.
Transform Matching Tex function.
Uncreate function.
Unwrite function.
Update From Alpha Func function.
Update From Func function.
Consume time inside animation groups without mutating scene objects.
Wiggle easing function.
Wiggle easing function.
Animate text or strokes with a writing-style reveal.
Abs value function.
Return evenly spaced values in the half-open interval ``[start, stop)``.
Arctan value function.
Arctan2 value function.
Around function.
Convert a value or nested sequence into a list-backed array shim.
Clamp scalars or nested lists into the provided numeric range.
Cos value function.
Exp function.
Return evenly spaced scalar samples between ``start`` and ``stop``.
Roll a 1D list-like sequence by ``shift`` positions.
Round scalars or nested sequences to a fixed precision.
Sin value function.
Sqrt value function.
Tan value function.
Uint8 function.
manim
Core Manim-compatible runtime primitives exposed to user scene code. This module defines the browser-friendly Python surface used by the compiler, including mobjects, scenes, animation helpers, and graphing primitives.
Constants
136BLACK
constantmanim.BLACK
"#000000"BLACK color constant.
Examples
value = BLACKBLUE
constantmanim.BLUE
"#58C4DD"BLUE color constant.
Examples
value = BLUEBLUE_A
constantmanim.BLUE_A
"#C7E9F1"BLUE A color constant.
Examples
value = BLUE_ABLUE_B
constantmanim.BLUE_B
"#9CDCEB"BLUE B color constant.
Examples
value = BLUE_BBLUE_C
constantmanim.BLUE_C
"#58C4DD"BLUE C color constant.
Examples
value = BLUE_CBLUE_D
constantmanim.BLUE_D
"#29ABCA"BLUE D color constant.
Examples
value = BLUE_DBLUE_E
constantmanim.BLUE_E
"#236B8E"BLUE E color constant.
Examples
value = BLUE_EBOLD
constantmanim.BOLD
"bold"Font-weight alias matching Manim's ``BOLD`` text style constant.
Examples
value = BOLDBOTTOM
constantmanim.BOTTOM
(0, -1, 0)BOTTOM direction vector constant.
Examples
value = BOTTOMconfig
constantmanim.config
_ConfigShim()Mutable compatibility config shim.
Examples
value = configCYAN
constantmanim.CYAN
"#00FFFF"CYAN color constant.
Examples
value = CYANDARK_BLUE
constantmanim.DARK_BLUE
BLUE_EDARK BLUE color constant.
Examples
value = DARK_BLUEDARK_BROWN
constantmanim.DARK_BROWN
"#8B4513"DARK BROWN color constant.
Examples
value = DARK_BROWNDARK_GRAY
constantmanim.DARK_GRAY
"#444444"DARK GRAY constant.
Examples
value = DARK_GRAYDARK_GREY
constantmanim.DARK_GREY
DARK_GRAYDARK GREY constant.
Examples
value = DARK_GREYDARKER_GRAY
constantmanim.DARKER_GRAY
"#222222"DARKER GRAY constant.
Examples
value = DARKER_GRAYDARKER_GREY
constantmanim.DARKER_GREY
DARKER_GRAYDARKER GREY constant.
Examples
value = DARKER_GREYDEFAULT_ARROW_TIP_LENGTH
constantmanim.DEFAULT_ARROW_TIP_LENGTH
0.35DEFAULT ARROW TIP LENGTH default constant.
Examples
value = DEFAULT_ARROW_TIP_LENGTHDEFAULT_DASH_LENGTH
constantmanim.DEFAULT_DASH_LENGTH
0.05DEFAULT DASH LENGTH default constant.
Examples
value = DEFAULT_DASH_LENGTHDEFAULT_DOT_RADIUS
constantmanim.DEFAULT_DOT_RADIUS
0.08DEFAULT DOT RADIUS default constant.
Examples
value = DEFAULT_DOT_RADIUSDEFAULT_FONT_SIZE
constantmanim.DEFAULT_FONT_SIZE
48DEFAULT FONT SIZE default constant.
Examples
value = DEFAULT_FONT_SIZEDEFAULT_MOBJECT_TO_EDGE_BUFFER
constantmanim.DEFAULT_MOBJECT_TO_EDGE_BUFFER
MED_LARGE_BUFFDEFAULT MOBJECT TO EDGE BUFFER spacing constant.
Examples
value = DEFAULT_MOBJECT_TO_EDGE_BUFFERDEFAULT_MOBJECT_TO_MOBJECT_BUFFER
constantmanim.DEFAULT_MOBJECT_TO_MOBJECT_BUFFER
MED_SMALL_BUFFDEFAULT MOBJECT TO MOBJECT BUFFER spacing constant.
Examples
value = DEFAULT_MOBJECT_TO_MOBJECT_BUFFERDEFAULT_SMALL_DOT_RADIUS
constantmanim.DEFAULT_SMALL_DOT_RADIUS
0.04DEFAULT SMALL DOT RADIUS default constant.
Examples
value = DEFAULT_SMALL_DOT_RADIUSDEFAULT_STROKE_WIDTH
constantmanim.DEFAULT_STROKE_WIDTH
4DEFAULT STROKE WIDTH default constant.
Examples
value = DEFAULT_STROKE_WIDTHDEGREES
constantmanim.DEGREES
PI / 180Conversion factor from degrees to radians.
Examples
value = DEGREESDL
constantmanim.DL
(-1, -1, 0)DL direction vector constant.
Examples
value = DLDOWN
constantmanim.DOWN
(0, -1, 0)Unit vector that points downward in scene coordinates.
Examples
value = DOWNDR
constantmanim.DR
(1, -1, 0)DR direction vector constant.
Examples
value = DRE
constantmanim.E
2.718281828459045Base of the natural logarithm.
Examples
value = EGOLD
constantmanim.GOLD
"#F0AC5F"GOLD color constant.
Examples
value = GOLDGOLD_A
constantmanim.GOLD_A
"#F7C797"GOLD A color constant.
Examples
value = GOLD_AGOLD_B
constantmanim.GOLD_B
"#F9B775"GOLD B color constant.
Examples
value = GOLD_BGOLD_C
constantmanim.GOLD_C
"#F0AC5F"GOLD C color constant.
Examples
value = GOLD_CGOLD_D
constantmanim.GOLD_D
"#E1A158"GOLD D color constant.
Examples
value = GOLD_DGOLD_E
constantmanim.GOLD_E
"#C78D46"GOLD E color constant.
Examples
value = GOLD_EGRAY
constantmanim.GRAY
GREYGRAY color constant.
Examples
value = GRAYGRAY_A
constantmanim.GRAY_A
GREY_AGRAY A constant.
Examples
value = GRAY_AGRAY_B
constantmanim.GRAY_B
GREY_BGRAY B constant.
Examples
value = GRAY_BGRAY_BROWN
constantmanim.GRAY_BROWN
GREY_BROWNGRAY BROWN color constant.
Examples
value = GRAY_BROWNGRAY_C
constantmanim.GRAY_C
GREY_CGRAY C constant.
Examples
value = GRAY_CGRAY_D
constantmanim.GRAY_D
GREY_DGRAY D constant.
Examples
value = GRAY_DGRAY_E
constantmanim.GRAY_E
GREY_EGRAY E constant.
Examples
value = GRAY_EGREEN
constantmanim.GREEN
"#83C167"GREEN color constant.
Examples
value = GREENGREEN_A
constantmanim.GREEN_A
"#C9E2AE"GREEN A color constant.
Examples
value = GREEN_AGREEN_B
constantmanim.GREEN_B
"#A6CF8C"GREEN B color constant.
Examples
value = GREEN_BGREEN_C
constantmanim.GREEN_C
"#83C167"GREEN C color constant.
Examples
value = GREEN_CGREEN_D
constantmanim.GREEN_D
"#77B05D"GREEN D color constant.
Examples
value = GREEN_DGREEN_E
constantmanim.GREEN_E
"#699C52"GREEN E color constant.
Examples
value = GREEN_EGREEN_SCREEN
constantmanim.GREEN_SCREEN
PURE_GREENGREEN SCREEN color constant.
Examples
value = GREEN_SCREENGREY
constantmanim.GREY
"#888888"GREY color constant.
Examples
value = GREYGREY_A
constantmanim.GREY_A
"#DDDDDD"GREY A constant.
Examples
value = GREY_AGREY_B
constantmanim.GREY_B
"#BBBBBB"GREY B constant.
Examples
value = GREY_BGREY_BROWN
constantmanim.GREY_BROWN
"#736357"GREY BROWN color constant.
Examples
value = GREY_BROWNGREY_C
constantmanim.GREY_C
"#888888"GREY C constant.
Examples
value = GREY_CGREY_D
constantmanim.GREY_D
"#444444"GREY D constant.
Examples
value = GREY_DGREY_E
constantmanim.GREY_E
"#222222"GREY E constant.
Examples
value = GREY_EIN
constantmanim.IN
(0, 0, -1)IN direction vector constant.
Examples
value = INITALIC
constantmanim.ITALIC
"italic"Font-slant alias matching Manim's ``ITALIC`` text style constant.
Examples
value = ITALICLARGE_BUFF
constantmanim.LARGE_BUFF
1LARGE BUFF spacing constant.
Examples
value = LARGE_BUFFLEFT
constantmanim.LEFT
(-1, 0, 0)Unit vector that points left in scene coordinates.
Examples
value = LEFTLEFT_SIDE
constantmanim.LEFT_SIDE
(-1, 0, 0)LEFT_SIDE direction vector constant.
Examples
value = LEFT_SIDELIGHT_BROWN
constantmanim.LIGHT_BROWN
"#B08968"LIGHT BROWN color constant.
Examples
value = LIGHT_BROWNLIGHT_GRAY
constantmanim.LIGHT_GRAY
"#BBBBBB"LIGHT GRAY constant.
Examples
value = LIGHT_GRAYLIGHT_GREY
constantmanim.LIGHT_GREY
LIGHT_GRAYLIGHT GREY constant.
Examples
value = LIGHT_GREYLIGHT_PINK
constantmanim.LIGHT_PINK
"#DC75CD"LIGHT PINK color constant.
Examples
value = LIGHT_PINKLIGHTER_GRAY
constantmanim.LIGHTER_GRAY
"#DDDDDD"LIGHTER GRAY constant.
Examples
value = LIGHTER_GRAYLIGHTER_GREY
constantmanim.LIGHTER_GREY
"#DDDDDD"LIGHTER GREY constant.
Examples
value = LIGHTER_GREYLOGO_BLACK
constantmanim.LOGO_BLACK
"#343434"LOGO BLACK color constant.
Examples
value = LOGO_BLACKLOGO_BLUE
constantmanim.LOGO_BLUE
"#525893"LOGO BLUE color constant.
Examples
value = LOGO_BLUELOGO_GREEN
constantmanim.LOGO_GREEN
"#87C2A5"LOGO GREEN color constant.
Examples
value = LOGO_GREENLOGO_RED
constantmanim.LOGO_RED
"#E07A5F"LOGO RED color constant.
Examples
value = LOGO_REDLOGO_WHITE
constantmanim.LOGO_WHITE
"#ECE7E2"LOGO WHITE color constant.
Examples
value = LOGO_WHITEMAGENTA
constantmanim.MAGENTA
"#FF00FF"MAGENTA constant.
Examples
value = MAGENTAMAROON
constantmanim.MAROON
"#C55F73"MAROON color constant.
Examples
value = MAROONMAROON_A
constantmanim.MAROON_A
"#ECABC1"MAROON A color constant.
Examples
value = MAROON_AMAROON_B
constantmanim.MAROON_B
"#EC92AB"MAROON B color constant.
Examples
value = MAROON_BMAROON_C
constantmanim.MAROON_C
"#C55F73"MAROON C color constant.
Examples
value = MAROON_CMAROON_D
constantmanim.MAROON_D
"#A24D61"MAROON D color constant.
Examples
value = MAROON_DMAROON_E
constantmanim.MAROON_E
"#94424F"MAROON E color constant.
Examples
value = MAROON_EMED_LARGE_BUFF
constantmanim.MED_LARGE_BUFF
0.5MED LARGE BUFF spacing constant.
Examples
value = MED_LARGE_BUFFMED_SMALL_BUFF
constantmanim.MED_SMALL_BUFF
0.25MED SMALL BUFF spacing constant.
Examples
value = MED_SMALL_BUFFNORMAL
constantmanim.NORMAL
"normal"Font-weight alias matching Manim's ``NORMAL`` text style constant.
Examples
value = NORMALORANGE
constantmanim.ORANGE
"#FF862F"ORANGE color constant.
Examples
value = ORANGEORIGIN
constantmanim.ORIGIN
(0, 0, 0)Origin point for the default scene coordinate system.
Examples
value = ORIGINOUT
constantmanim.OUT
(0, 0, 1)OUT direction vector constant.
Examples
value = OUTPI
constantmanim.PI
3.141592653589793Ratio of a circle's circumference to its diameter.
Examples
value = PIPINK
constantmanim.PINK
"#D147BD"PINK color constant.
Examples
value = PINKPURE_BLUE
constantmanim.PURE_BLUE
"#0000FF"PURE BLUE color constant.
Examples
value = PURE_BLUEPURE_CYAN
constantmanim.PURE_CYAN
"#00FFFF"PURE CYAN color constant.
Examples
value = PURE_CYANPURE_GREEN
constantmanim.PURE_GREEN
"#00FF00"PURE GREEN color constant.
Examples
value = PURE_GREENPURE_MAGENTA
constantmanim.PURE_MAGENTA
"#FF00FF"PURE MAGENTA constant.
Examples
value = PURE_MAGENTAPURE_RED
constantmanim.PURE_RED
"#FF0000"PURE RED color constant.
Examples
value = PURE_REDPURE_YELLOW
constantmanim.PURE_YELLOW
"#FFFF00"PURE YELLOW color constant.
Examples
value = PURE_YELLOWPURPLE
constantmanim.PURPLE
"#9A72AC"PURPLE color constant.
Examples
value = PURPLEPURPLE_A
constantmanim.PURPLE_A
"#CAA3E8"PURPLE A color constant.
Examples
value = PURPLE_APURPLE_B
constantmanim.PURPLE_B
"#B189C6"PURPLE B color constant.
Examples
value = PURPLE_BPURPLE_C
constantmanim.PURPLE_C
"#9A72AC"PURPLE C color constant.
Examples
value = PURPLE_CPURPLE_D
constantmanim.PURPLE_D
"#715582"PURPLE D color constant.
Examples
value = PURPLE_DPURPLE_E
constantmanim.PURPLE_E
"#644172"PURPLE E color constant.
Examples
value = PURPLE_Erandom
constantmanim.random
_RandomShim()Random constant.
Examples
value = randomrate_functions
constantmanim.rate_functions
_RateFunctions()Rate functions constant.
Examples
value = rate_functionsRED
constantmanim.RED
"#FC6255"RED color constant.
Examples
value = REDRED_A
constantmanim.RED_A
"#F7A1A3"RED A color constant.
Examples
value = RED_ARED_B
constantmanim.RED_B
"#FF8080"RED B color constant.
Examples
value = RED_BRED_C
constantmanim.RED_C
"#FC6255"RED C color constant.
Examples
value = RED_CRED_D
constantmanim.RED_D
"#E65A4C"RED D color constant.
Examples
value = RED_DRED_E
constantmanim.RED_E
"#CF5044"RED E color constant.
Examples
value = RED_ERestore
constantmanim.Restore
_restore_animationRestore constant.
Examples
value = RestoreRIGHT
constantmanim.RIGHT
(1, 0, 0)Unit vector that points right in scene coordinates.
Examples
value = RIGHTRIGHT_SIDE
constantmanim.RIGHT_SIDE
(1, 0, 0)RIGHT_SIDE direction vector constant.
Examples
value = RIGHT_SIDESMALL_BUFF
constantmanim.SMALL_BUFF
0.1SMALL BUFF spacing constant.
Examples
value = SMALL_BUFFSTART_X
constantmanim.START_X
30START X constant.
Examples
value = START_XSTART_Y
constantmanim.START_Y
20START Y constant.
Examples
value = START_YTAU
constantmanim.TAU
6.283185307179586Full turn constant, equal to ``2 * PI``.
Examples
value = TAUTEAL
constantmanim.TEAL
"#5CD0B3"TEAL color constant.
Examples
value = TEALTEAL_A
constantmanim.TEAL_A
"#ACEAD7"TEAL A color constant.
Examples
value = TEAL_ATEAL_B
constantmanim.TEAL_B
"#76DDC0"TEAL B color constant.
Examples
value = TEAL_BTEAL_C
constantmanim.TEAL_C
"#5CD0B3"TEAL C color constant.
Examples
value = TEAL_CTEAL_D
constantmanim.TEAL_D
"#55C1A7"TEAL D color constant.
Examples
value = TEAL_DTEAL_E
constantmanim.TEAL_E
"#49A88F"TEAL E color constant.
Examples
value = TEAL_ETEXT_MOBJECT_SCALE
constantmanim.TEXT_MOBJECT_SCALE
1.18TEXT MOBJECT SCALE constant.
Examples
value = TEXT_MOBJECT_SCALETOP
constantmanim.TOP
(0, 1, 0)TOP direction vector constant.
Examples
value = TOPUL
constantmanim.UL
(-1, 1, 0)UL direction vector constant.
Examples
value = ULUP
constantmanim.UP
(0, 1, 0)Unit vector that points upward in scene coordinates.
Examples
value = UPUR
constantmanim.UR
(1, 1, 0)UR direction vector constant.
Examples
value = URWHITE
constantmanim.WHITE
"#FFFFFF"WHITE color constant.
Examples
value = WHITEX_AXIS
constantmanim.X_AXIS
(1, 0, 0)X AXIS constant.
Examples
value = X_AXISY_AXIS
constantmanim.Y_AXIS
(0, 1, 0)Y AXIS constant.
Examples
value = Y_AXISYELLOW
constantmanim.YELLOW
"#F7D96F"YELLOW color constant.
Examples
value = YELLOWYELLOW_A
constantmanim.YELLOW_A
"#FFF1B6"YELLOW A color constant.
Examples
value = YELLOW_AYELLOW_B
constantmanim.YELLOW_B
"#FFEA94"YELLOW B color constant.
Examples
value = YELLOW_BYELLOW_C
constantmanim.YELLOW_C
"#F7D96F"YELLOW C color constant.
Examples
value = YELLOW_CYELLOW_D
constantmanim.YELLOW_D
"#F4D345"YELLOW D color constant.
Examples
value = YELLOW_DYELLOW_E
constantmanim.YELLOW_E
"#E8C11C"YELLOW E color constant.
Examples
value = YELLOW_EZ_AXIS
constantmanim.Z_AXIS
(0, 0, 1)Z AXIS constant.
Examples
value = Z_AXISFunctions
115AddTextLetterByLetter
functionmanim.AddTextLetterByLetter
def AddTextLetterByLetter(obj, run_time=None, **kwargs)Add Text Letter By Letter function.
Parameters
Obj accepted by AddTextLetterByLetter.
Run time accepted by AddTextLetterByLetter.
Kwargs accepted by AddTextLetterByLetter.
Returns
The animation, mobject, or computed value produced by AddTextLetterByLetter.
Examples
result = AddTextLetterByLetter(obj, run_time)always_redraw
functionmanim.always_redraw
def always_redraw(func)Creates an object that is redrawn every frame by calling func(). The returned object is tagged and given an updater that copies fresh geometry/state every frame, mirroring Manim's always_redraw behavior.
Parameters
Callback returning a freshly constructed mobject.
Returns
A mobject kept in sync with the callback result on every frame.
Examples
tracker = ValueTracker(0)dot = always_redraw(lambda: Dot(RIGHT * tracker.get_value()))angle_of_vector
functionmanim.angle_of_vector
def angle_of_vector(vector)Return the polar angle of a 2D vector in radians.
Parameters
Vector accepted by angle_of_vector.
Returns
The animation, mobject, or computed value produced by angle_of_vector.
Examples
result = angle_of_vector(vector)AnimationGroup
functionmanim.AnimationGroup
def AnimationGroup(*animations, lag_ratio=0, run_time=None, **kwargs)Run multiple animations together as a grouped unit.
Parameters
Child animations to run together.
Relative offset between child animations.
Optional total duration override.
Additional group options passed through to playback.
Returns
A grouped animation descriptor consumed by ``Scene.play``.
Examples
scene.play(AnimationGroup(FadeIn(left), FadeIn(right), lag_ratio=0.1))ApplyFunction
functionmanim.ApplyFunction
def ApplyFunction(func, mobject, run_time=None, **kwargs)Animate a mobject toward the result of applying a callback to it.
Parameters
Callback that mutates and returns the target mobject state.
Source mobject.
Optional animation duration override.
Additional transform options.
Returns
The animation, mobject, or computed value produced by ApplyFunction.
Examples
scene.play(ApplyFunction(mobject))ApplyMethod
functionmanim.ApplyMethod
def ApplyMethod(method, *args, run_time=None, **kwargs)Apply Method animation helper.
Parameters
Method accepted by ApplyMethod.
Args accepted by ApplyMethod.
Run time accepted by ApplyMethod.
Kwargs accepted by ApplyMethod.
Returns
The animation, mobject, or computed value produced by ApplyMethod.
Examples
scene.play(ApplyMethod(mobject))ApplyPointwiseFunction
functionmanim.ApplyPointwiseFunction
def ApplyPointwiseFunction(func, mobject, run_time=None, **kwargs)Apply Pointwise Function animation helper.
Parameters
Func accepted by ApplyPointwiseFunction.
Mobject accepted by ApplyPointwiseFunction.
Run time accepted by ApplyPointwiseFunction.
Kwargs accepted by ApplyPointwiseFunction.
Returns
The animation, mobject, or computed value produced by ApplyPointwiseFunction.
Examples
scene.play(ApplyPointwiseFunction(mobject))ApplyPointwiseFunctionToCenter
functionmanim.ApplyPointwiseFunctionToCenter
def ApplyPointwiseFunctionToCenter(func, mobject, run_time=None, **kwargs)Apply Pointwise Function To Center animation helper.
Parameters
Func accepted by ApplyPointwiseFunctionToCenter.
Mobject accepted by ApplyPointwiseFunctionToCenter.
Run time accepted by ApplyPointwiseFunctionToCenter.
Kwargs accepted by ApplyPointwiseFunctionToCenter.
Returns
The animation, mobject, or computed value produced by ApplyPointwiseFunctionToCenter.
Examples
scene.play(ApplyPointwiseFunctionToCenter(mobject))ApplyWave
functionmanim.ApplyWave
def ApplyWave(mobject, direction=RIGHT, amplitude=0.25, color=YELLOW, run_time=None, **kwargs)Approximate a wave highlight by sliding a temporary colored copy.
Parameters
Target mobject to emphasize.
Wave travel direction.
Shift distance applied to the temporary overlay.
Highlight color for the overlay.
Optional animation duration override.
Additional animation options passed through to playback.
Returns
The animation, mobject, or computed value produced by ApplyWave.
Examples
scene.play(ApplyWave(text, direction=UP))arccos
functionmanim.arccos
def arccos(x)Arccos math helper.
Parameters
X accepted by arccos.
Returns
The animation, mobject, or computed value produced by arccos.
Examples
result = arccos(x)Blink
functionmanim.Blink
def Blink(mobject, color=YELLOW, run_time=None, **kwargs)Approximate a blink with a fast temporary overlay flash.
Parameters
Target mobject to blink.
Blink overlay color.
Optional animation duration override.
Additional animation options passed through to playback.
Returns
The animation, mobject, or computed value produced by Blink.
Examples
scene.play(Blink(cursor))bounce
functionmanim.bounce
def bounce(t)Bounce easing function.
Parameters
T accepted by bounce.
Returns
The animation, mobject, or computed value produced by bounce.
Examples
result = bounce(t)BraceBetweenPoints
functionmanim.BraceBetweenPoints
def BraceBetweenPoints(point1, point2, direction=RIGHT, **kwargs)Create a brace between two points
Parameters
Point1 accepted by BraceBetweenPoints.
Point2 accepted by BraceBetweenPoints.
Direction accepted by BraceBetweenPoints.
Kwargs accepted by BraceBetweenPoints.
Returns
The animation, mobject, or computed value produced by BraceBetweenPoints.
Examples
result = BraceBetweenPoints(point1, point2)ceil
functionmanim.ceil
def ceil(x)Ceil function.
Parameters
X accepted by ceil.
Returns
The animation, mobject, or computed value produced by ceil.
Examples
result = ceil(x)Circumscribe
functionmanim.Circumscribe
def Circumscribe(mobject, shape=None, color=YELLOW, buff=0.1, stroke_width=6, run_time=None, **kwargs)Draw and fade a temporary outline around a target mobject.
Parameters
Target mobject to trace.
Optional outline constructor such as ``Circle``.
Outline color.
Padding between the outline and target.
Outline stroke width.
Optional animation duration override.
Additional styling or playback options.
Returns
The animation, mobject, or computed value produced by Circumscribe.
Examples
scene.play(Circumscribe(formula))scene.play(Circumscribe(formula, shape=Circle, color=BLUE))ClockwiseTransform
functionmanim.ClockwiseTransform
def ClockwiseTransform(obj, target_mobject, run_time=None, **kwargs)Clockwise Transform animation helper.
Parameters
Obj accepted by ClockwiseTransform.
Target mobject accepted by ClockwiseTransform.
Run time accepted by ClockwiseTransform.
Kwargs accepted by ClockwiseTransform.
Returns
The animation, mobject, or computed value produced by ClockwiseTransform.
Examples
result = ClockwiseTransform(obj, target_mobject)color_gradient
functionmanim.color_gradient
def color_gradient(reference_colors, length_of_output)Interpolate a list of colors into a gradient of the requested length.
Parameters
Reference colors accepted by color_gradient.
Length of output accepted by color_gradient.
Returns
The animation, mobject, or computed value produced by color_gradient.
Examples
result = color_gradient(reference_colors, length_of_output)cos
functionmanim.cos
def cos(x)Cos math helper.
Parameters
X accepted by cos.
Returns
The animation, mobject, or computed value produced by cos.
Examples
result = cos(x)CounterclockwiseTransform
functionmanim.CounterclockwiseTransform
def CounterclockwiseTransform(obj, target_mobject, run_time=None, **kwargs)Counterclockwise Transform animation helper.
Parameters
Obj accepted by CounterclockwiseTransform.
Target mobject accepted by CounterclockwiseTransform.
Run time accepted by CounterclockwiseTransform.
Kwargs accepted by CounterclockwiseTransform.
Returns
The animation, mobject, or computed value produced by CounterclockwiseTransform.
Examples
result = CounterclockwiseTransform(obj, target_mobject)Create
functionmanim.Create
def Create(obj, run_time=None, **kwargs)Animate a mobject as if it is being drawn into the scene.
Parameters
Mobject to animate.
Optional animation duration override.
Additional animation options passed through to playback.
Returns
A normalized animation descriptor consumed by ``Scene.play``.
Examples
scene.play(Create(Square()), run_time=1)CyclicReplace
functionmanim.CyclicReplace
def CyclicReplace(*mobjects, run_time=None, **kwargs)Cyclic Replace animation helper.
Parameters
Mobjects accepted by CyclicReplace.
Run time accepted by CyclicReplace.
Kwargs accepted by CyclicReplace.
Returns
The animation, mobject, or computed value produced by CyclicReplace.
Examples
result = CyclicReplace(mobjects, run_time)degrees_to_rad
functionmanim.degrees_to_rad
def degrees_to_rad(degrees)Degrees to rad math helper.
Parameters
Degrees accepted by degrees_to_rad.
Returns
The animation, mobject, or computed value produced by degrees_to_rad.
Examples
result = degrees_to_rad(degrees)double_smooth
functionmanim.double_smooth
def double_smooth(t)Double smooth easing function.
Parameters
T accepted by double_smooth.
Returns
The animation, mobject, or computed value produced by double_smooth.
Examples
result = double_smooth(t)ease_in
functionmanim.ease_in
def ease_in(t)Ease in easing function.
Parameters
T accepted by ease_in.
Returns
The animation, mobject, or computed value produced by ease_in.
Examples
result = ease_in(t)ease_in_back
functionmanim.ease_in_back
def ease_in_back(t)Ease in back easing function.
Parameters
T accepted by ease_in_back.
Returns
The animation, mobject, or computed value produced by ease_in_back.
Examples
result = ease_in_back(t)ease_in_bounce
functionmanim.ease_in_bounce
def ease_in_bounce(t)Ease in bounce easing function.
Parameters
T accepted by ease_in_bounce.
Returns
The animation, mobject, or computed value produced by ease_in_bounce.
Examples
result = ease_in_bounce(t)ease_in_circ
functionmanim.ease_in_circ
def ease_in_circ(t)Ease in circ easing function.
Parameters
T accepted by ease_in_circ.
Returns
The animation, mobject, or computed value produced by ease_in_circ.
Examples
result = ease_in_circ(t)ease_in_cubic
functionmanim.ease_in_cubic
def ease_in_cubic(t)Ease in cubic easing function.
Parameters
T accepted by ease_in_cubic.
Returns
The animation, mobject, or computed value produced by ease_in_cubic.
Examples
result = ease_in_cubic(t)ease_in_elastic
functionmanim.ease_in_elastic
def ease_in_elastic(t)Ease in elastic easing function.
Parameters
T accepted by ease_in_elastic.
Returns
The animation, mobject, or computed value produced by ease_in_elastic.
Examples
result = ease_in_elastic(t)ease_in_expo
functionmanim.ease_in_expo
def ease_in_expo(t)Ease in expo easing function.
Parameters
T accepted by ease_in_expo.
Returns
The animation, mobject, or computed value produced by ease_in_expo.
Examples
result = ease_in_expo(t)ease_in_out
functionmanim.ease_in_out
def ease_in_out(t)Ease in out easing function.
Parameters
T accepted by ease_in_out.
Returns
The animation, mobject, or computed value produced by ease_in_out.
Examples
result = ease_in_out(t)ease_in_out_back
functionmanim.ease_in_out_back
def ease_in_out_back(t)Ease in out back easing function.
Parameters
T accepted by ease_in_out_back.
Returns
The animation, mobject, or computed value produced by ease_in_out_back.
Examples
result = ease_in_out_back(t)ease_in_out_bounce
functionmanim.ease_in_out_bounce
def ease_in_out_bounce(t)Ease in out bounce easing function.
Parameters
T accepted by ease_in_out_bounce.
Returns
The animation, mobject, or computed value produced by ease_in_out_bounce.
Examples
result = ease_in_out_bounce(t)ease_in_out_circ
functionmanim.ease_in_out_circ
def ease_in_out_circ(t)Ease in out circ easing function.
Parameters
T accepted by ease_in_out_circ.
Returns
The animation, mobject, or computed value produced by ease_in_out_circ.
Examples
result = ease_in_out_circ(t)ease_in_out_cubic
functionmanim.ease_in_out_cubic
def ease_in_out_cubic(t)Ease in out cubic easing function.
Parameters
T accepted by ease_in_out_cubic.
Returns
The animation, mobject, or computed value produced by ease_in_out_cubic.
Examples
result = ease_in_out_cubic(t)ease_in_out_elastic
functionmanim.ease_in_out_elastic
def ease_in_out_elastic(t)Ease in out elastic easing function.
Parameters
T accepted by ease_in_out_elastic.
Returns
The animation, mobject, or computed value produced by ease_in_out_elastic.
Examples
result = ease_in_out_elastic(t)ease_in_out_expo
functionmanim.ease_in_out_expo
def ease_in_out_expo(t)Ease in out expo easing function.
Parameters
T accepted by ease_in_out_expo.
Returns
The animation, mobject, or computed value produced by ease_in_out_expo.
Examples
result = ease_in_out_expo(t)ease_in_out_quad
functionmanim.ease_in_out_quad
def ease_in_out_quad(t)Ease in out quad easing function.
Parameters
T accepted by ease_in_out_quad.
Returns
The animation, mobject, or computed value produced by ease_in_out_quad.
Examples
result = ease_in_out_quad(t)ease_in_out_quart
functionmanim.ease_in_out_quart
def ease_in_out_quart(t)Ease in out quart easing function.
Parameters
T accepted by ease_in_out_quart.
Returns
The animation, mobject, or computed value produced by ease_in_out_quart.
Examples
result = ease_in_out_quart(t)ease_in_out_quint
functionmanim.ease_in_out_quint
def ease_in_out_quint(t)Ease in out quint easing function.
Parameters
T accepted by ease_in_out_quint.
Returns
The animation, mobject, or computed value produced by ease_in_out_quint.
Examples
result = ease_in_out_quint(t)ease_in_out_sine
functionmanim.ease_in_out_sine
def ease_in_out_sine(t)Ease in out sine easing function.
Parameters
T accepted by ease_in_out_sine.
Returns
The animation, mobject, or computed value produced by ease_in_out_sine.
Examples
result = ease_in_out_sine(t)ease_in_quad
functionmanim.ease_in_quad
def ease_in_quad(t)Ease in quad easing function.
Parameters
T accepted by ease_in_quad.
Returns
The animation, mobject, or computed value produced by ease_in_quad.
Examples
result = ease_in_quad(t)ease_in_quart
functionmanim.ease_in_quart
def ease_in_quart(t)Ease in quart easing function.
Parameters
T accepted by ease_in_quart.
Returns
The animation, mobject, or computed value produced by ease_in_quart.
Examples
result = ease_in_quart(t)ease_in_quint
functionmanim.ease_in_quint
def ease_in_quint(t)Ease in quint easing function.
Parameters
T accepted by ease_in_quint.
Returns
The animation, mobject, or computed value produced by ease_in_quint.
Examples
result = ease_in_quint(t)ease_in_sine
functionmanim.ease_in_sine
def ease_in_sine(t)Ease in sine easing function.
Parameters
T accepted by ease_in_sine.
Returns
The animation, mobject, or computed value produced by ease_in_sine.
Examples
result = ease_in_sine(t)ease_out
functionmanim.ease_out
def ease_out(t)Ease out easing function.
Parameters
T accepted by ease_out.
Returns
The animation, mobject, or computed value produced by ease_out.
Examples
result = ease_out(t)ease_out_back
functionmanim.ease_out_back
def ease_out_back(t)Ease out back easing function.
Parameters
T accepted by ease_out_back.
Returns
The animation, mobject, or computed value produced by ease_out_back.
Examples
result = ease_out_back(t)ease_out_bounce
functionmanim.ease_out_bounce
def ease_out_bounce(t)Ease out bounce easing function.
Parameters
T accepted by ease_out_bounce.
Returns
The animation, mobject, or computed value produced by ease_out_bounce.
Examples
result = ease_out_bounce(t)ease_out_circ
functionmanim.ease_out_circ
def ease_out_circ(t)Ease out circ easing function.
Parameters
T accepted by ease_out_circ.
Returns
The animation, mobject, or computed value produced by ease_out_circ.
Examples
result = ease_out_circ(t)ease_out_cubic
functionmanim.ease_out_cubic
def ease_out_cubic(t)Ease out cubic easing function.
Parameters
T accepted by ease_out_cubic.
Returns
The animation, mobject, or computed value produced by ease_out_cubic.
Examples
result = ease_out_cubic(t)ease_out_elastic
functionmanim.ease_out_elastic
def ease_out_elastic(t)Ease out elastic easing function.
Parameters
T accepted by ease_out_elastic.
Returns
The animation, mobject, or computed value produced by ease_out_elastic.
Examples
result = ease_out_elastic(t)ease_out_expo
functionmanim.ease_out_expo
def ease_out_expo(t)Ease out expo easing function.
Parameters
T accepted by ease_out_expo.
Returns
The animation, mobject, or computed value produced by ease_out_expo.
Examples
result = ease_out_expo(t)ease_out_quad
functionmanim.ease_out_quad
def ease_out_quad(t)Ease out quad easing function.
Parameters
T accepted by ease_out_quad.
Returns
The animation, mobject, or computed value produced by ease_out_quad.
Examples
result = ease_out_quad(t)ease_out_quart
functionmanim.ease_out_quart
def ease_out_quart(t)Ease out quart easing function.
Parameters
T accepted by ease_out_quart.
Returns
The animation, mobject, or computed value produced by ease_out_quart.
Examples
result = ease_out_quart(t)ease_out_quint
functionmanim.ease_out_quint
def ease_out_quint(t)Ease out quint easing function.
Parameters
T accepted by ease_out_quint.
Returns
The animation, mobject, or computed value produced by ease_out_quint.
Examples
result = ease_out_quint(t)ease_out_sine
functionmanim.ease_out_sine
def ease_out_sine(t)Ease out sine easing function.
Parameters
T accepted by ease_out_sine.
Returns
The animation, mobject, or computed value produced by ease_out_sine.
Examples
result = ease_out_sine(t)elastic
functionmanim.elastic
def elastic(t)Elastic easing function.
Parameters
T accepted by elastic.
Returns
The animation, mobject, or computed value produced by elastic.
Examples
result = elastic(t)exponential_decay
functionmanim.exponential_decay
def exponential_decay(t, half_life=0.1)Exponential decay easing function.
Parameters
T accepted by exponential_decay.
Half life accepted by exponential_decay.
Returns
The animation, mobject, or computed value produced by exponential_decay.
Examples
result = exponential_decay(t, half_life)FadeIn
functionmanim.FadeIn
def FadeIn(obj, run_time=None, **kwargs)Animate a mobject from invisible to visible.
Parameters
Mobject to reveal.
Optional animation duration override.
Additional animation options such as ``shift`` or ``scale``.
Returns
A normalized animation descriptor consumed by ``Scene.play``.
Examples
scene.play(FadeIn(card, shift=UP * 0.2))FadeOut
functionmanim.FadeOut
def FadeOut(obj, run_time=None, **kwargs)Animate a mobject from visible to invisible.
Parameters
Obj accepted by FadeOut.
Run time accepted by FadeOut.
Kwargs accepted by FadeOut.
Returns
The animation, mobject, or computed value produced by FadeOut.
Examples
scene.play(FadeOut(mobject))Flash
functionmanim.Flash
def Flash(point_or_mobject, color=YELLOW, line_length=0.35, stroke_width=6, run_time=None, **kwargs)Approximate Manim's flash burst with a temporary star marker.
Parameters
World point or mobject center to flash.
Burst color.
Approximate burst radius.
Marker stroke width.
Optional animation duration override.
Additional animation options passed through to playback.
Returns
The animation, mobject, or computed value produced by Flash.
Examples
scene.play(Flash(dot))scene.play(Flash(ORIGIN, color=ORANGE))floor
functionmanim.floor
def floor(x)Floor function.
Parameters
X accepted by floor.
Returns
The animation, mobject, or computed value produced by floor.
Examples
result = floor(x)FocusOn
functionmanim.FocusOn
def FocusOn(mobject, color=YELLOW, buff=0.25, run_time=None, **kwargs)Spotlight a target with a temporary circular focus ring.
Parameters
Target mobject to emphasize.
Ring color.
Extra padding around the target.
Optional animation duration override.
Additional animation or styling options.
Returns
The animation, mobject, or computed value produced by FocusOn.
Examples
scene.play(FocusOn(graph_label))get_image_asset
functionmanim.get_image_asset
def get_image_asset(image_id, default=None)Get image asset function.
Parameters
Image id accepted by get_image_asset.
Default accepted by get_image_asset.
Returns
The animation, mobject, or computed value produced by get_image_asset.
Examples
result = get_image_asset(image_id, default)get_images_map
functionmanim.get_images_map
def get_images_map()Get images map function.
Returns
The animation, mobject, or computed value produced by get_images_map.
Examples
result = get_images_map()GrowArrow
functionmanim.GrowArrow
def GrowArrow(obj, run_time=None, **kwargs)Animate an arrow-like mobject growing into view.
Parameters
Arrow or line-like mobject to reveal.
Optional animation duration override.
Additional animation options passed through to playback.
Returns
A normalized animation descriptor consumed by ``Scene.play``.
Examples
scene.play(GrowArrow(Arrow(LEFT, RIGHT)))GrowFromCenter
functionmanim.GrowFromCenter
def GrowFromCenter(obj, run_time=None, **kwargs)Grow From Center function.
Parameters
Obj accepted by GrowFromCenter.
Run time accepted by GrowFromCenter.
Kwargs accepted by GrowFromCenter.
Returns
The animation, mobject, or computed value produced by GrowFromCenter.
Examples
scene.play(GrowFromCenter(mobject))GrowFromPoint
functionmanim.GrowFromPoint
def GrowFromPoint(obj, point, run_time=None, **kwargs)Grow From Point function.
Parameters
Obj accepted by GrowFromPoint.
Point accepted by GrowFromPoint.
Run time accepted by GrowFromPoint.
Kwargs accepted by GrowFromPoint.
Returns
The animation, mobject, or computed value produced by GrowFromPoint.
Examples
scene.play(GrowFromPoint(mobject))Indicate
functionmanim.Indicate
def Indicate(obj, color=YELLOW, scale_factor=1.1, run_time=None, **kwargs)Overlay a short pulse highlight on a mobject.
Parameters
Mobject to highlight.
Highlight color for the temporary overlay.
Pulse scale applied to the overlay.
Optional animation duration override.
Additional animation options passed through to playback.
Returns
The animation, mobject, or computed value produced by Indicate.
Examples
scene.play(Indicate(label, color=YELLOW))interpolate_color
functionmanim.interpolate_color
def interpolate_color(colora, colorb, amount)Linearly interpolate between two colors.
Parameters
Colora accepted by interpolate_color.
Colorb accepted by interpolate_color.
Amount accepted by interpolate_color.
Returns
The animation, mobject, or computed value produced by interpolate_color.
Examples
result = interpolate_color(colora, colorb)LaggedStart
functionmanim.LaggedStart
def LaggedStart(*animations, lag_ratio=0.1, run_time=None, **kwargs)Run multiple animations with a staggered start offset.
Parameters
Animations accepted by LaggedStart.
Lag ratio accepted by LaggedStart.
Run time accepted by LaggedStart.
Kwargs accepted by LaggedStart.
Returns
The animation, mobject, or computed value produced by LaggedStart.
Examples
result = LaggedStart(animations, lag_ratio)LaggedStartMap
functionmanim.LaggedStartMap
def LaggedStartMap(animation_func, group, lag_ratio=0.1, run_time=None, **kwargs)Map an animation factory across a group and stagger the results.
Parameters
Callable that creates one animation per item.
Group or iterable of mobjects.
Fractional stagger applied between generated animations.
Optional duration override for the generated group.
Extra keyword arguments forwarded to ``animation_func``.
Returns
A grouped animation descriptor consumed by ``Scene.play``.
Examples
result = LaggedStartMap(animation_func, group)linear
functionmanim.linear
def linear(t)Linear easing function.
Parameters
T accepted by linear.
Returns
The animation, mobject, or computed value produced by linear.
Examples
result = linear(t)lingering
functionmanim.lingering
def lingering(t)Lingering function.
Parameters
T accepted by lingering.
Returns
The animation, mobject, or computed value produced by lingering.
Examples
result = lingering(t)MaintainPositionRelativeTo
functionmanim.MaintainPositionRelativeTo
def MaintainPositionRelativeTo(mobject, tracked_mobject, run_time=None, **kwargs)Maintain Position Relative To function.
Parameters
Mobject accepted by MaintainPositionRelativeTo.
Tracked mobject accepted by MaintainPositionRelativeTo.
Run time accepted by MaintainPositionRelativeTo.
Kwargs accepted by MaintainPositionRelativeTo.
Returns
The animation, mobject, or computed value produced by MaintainPositionRelativeTo.
Examples
result = MaintainPositionRelativeTo(mobject, tracked_mobject)MoveAlongPath
functionmanim.MoveAlongPath
def MoveAlongPath(obj, path, run_time=None, **kwargs)Animate ``obj`` along sampled points from a path-like mobject.
Parameters
Obj accepted by MoveAlongPath.
Path accepted by MoveAlongPath.
Run time accepted by MoveAlongPath.
Kwargs accepted by MoveAlongPath.
Returns
The animation, mobject, or computed value produced by MoveAlongPath.
Examples
scene.play(MoveAlongPath(mobject))MoveTo
functionmanim.MoveTo
def MoveTo(obj, point, run_time=None, **kwargs)Animate a move to a target point.
Parameters
Mobject to move.
Destination point.
Optional animation duration override.
Additional animation options passed through to playback.
Returns
A normalized transform descriptor consumed by ``Scene.play``.
Examples
scene.play(MoveTo(dot, UP * 2))MoveToTarget
functionmanim.MoveToTarget
def MoveToTarget(obj, run_time=None, **kwargs)Move To Target function.
Parameters
Obj accepted by MoveToTarget.
Run time accepted by MoveToTarget.
Kwargs accepted by MoveToTarget.
Returns
The animation, mobject, or computed value produced by MoveToTarget.
Examples
scene.play(MoveToTarget(mobject))not_quite_there
functionmanim.not_quite_there
def not_quite_there(t, proportion=0.7)Not quite there function.
Parameters
T accepted by not_quite_there.
Proportion accepted by not_quite_there.
Returns
The animation, mobject, or computed value produced by not_quite_there.
Examples
result = not_quite_there(t, proportion)radians
functionmanim.radians
def radians(degrees)Radians math helper.
Parameters
Degrees accepted by radians.
Returns
The animation, mobject, or computed value produced by radians.
Examples
result = radians(degrees)ReplacementTransform
functionmanim.ReplacementTransform
def ReplacementTransform(obj, target_mobject, run_time=None, **kwargs)Transform one mobject into another while conceptually replacing it.
Parameters
Obj accepted by ReplacementTransform.
Target mobject accepted by ReplacementTransform.
Run time accepted by ReplacementTransform.
Kwargs accepted by ReplacementTransform.
Returns
The animation, mobject, or computed value produced by ReplacementTransform.
Examples
result = ReplacementTransform(obj, target_mobject)Rotate
functionmanim.Rotate
def Rotate(obj, angle=PI, run_time=None, axis=OUT, **kwargs)Animate a rotation transform, optionally around ``about_point``.
Parameters
Mobject to rotate.
Rotation amount in radians.
Optional animation duration override.
Rotation axis vector (3D compatibility).
Additional animation options, including ``about_point``.
Returns
A normalized transform descriptor consumed by ``Scene.play``.
Examples
scene.play(Rotate(square, angle=PI / 2, about_point=ORIGIN))Rotating
functionmanim.Rotating
def Rotating(obj, angle=2 * PI, about_point=None, run_time=None, **kwargs)Rotating function.
Parameters
Obj accepted by Rotating.
Angle accepted by Rotating.
About point accepted by Rotating.
Run time accepted by Rotating.
Kwargs accepted by Rotating.
Returns
The animation, mobject, or computed value produced by Rotating.
Examples
result = Rotating(obj, angle)running_start
functionmanim.running_start
def running_start(t, pull_factor=-0.5)Running start function.
Parameters
T accepted by running_start.
Pull factor accepted by running_start.
Returns
The animation, mobject, or computed value produced by running_start.
Examples
result = running_start(t, pull_factor)rush_from
functionmanim.rush_from
def rush_from(t)Rush from easing function.
Parameters
T accepted by rush_from.
Returns
The animation, mobject, or computed value produced by rush_from.
Examples
result = rush_from(t)rush_into
functionmanim.rush_into
def rush_into(t)Rush into easing function.
Parameters
T accepted by rush_into.
Returns
The animation, mobject, or computed value produced by rush_into.
Examples
result = rush_into(t)Scale
functionmanim.Scale
def Scale(obj, factor, run_time=None, **kwargs)Animate a scale transform, optionally around ``about_point``.
Parameters
Mobject to scale.
Scalar or per-axis scale value.
Optional animation duration override.
Additional animation options, including ``about_point``.
Returns
A normalized transform descriptor consumed by ``Scene.play``.
Examples
scene.play(Scale(group, 1.2, about_point=ORIGIN))ScaleInPlace
functionmanim.ScaleInPlace
def ScaleInPlace(obj, factor, run_time=None, **kwargs)Scale In Place function.
Parameters
Obj accepted by ScaleInPlace.
Factor accepted by ScaleInPlace.
Run time accepted by ScaleInPlace.
Kwargs accepted by ScaleInPlace.
Returns
The animation, mobject, or computed value produced by ScaleInPlace.
Examples
scene.play(ScaleInPlace(mobject))Shift
functionmanim.Shift
def Shift(obj, vector, run_time=None, **kwargs)Animate a translation by a vector.
Parameters
Obj accepted by Shift.
Vector accepted by Shift.
Run time accepted by Shift.
Kwargs accepted by Shift.
Returns
The animation, mobject, or computed value produced by Shift.
Examples
result = Shift(obj, vector)ShowPassingFlash
functionmanim.ShowPassingFlash
def ShowPassingFlash(mobject, color=YELLOW, run_time=None, **kwargs)Sweep a temporary highlighted copy across an existing mobject.
Parameters
Target mobject to flash.
Highlight color for the temporary overlay.
Optional animation duration override.
Additional animation options passed through to playback.
Returns
The animation, mobject, or computed value produced by ShowPassingFlash.
Examples
scene.play(ShowPassingFlash(path, color=GREEN))ShowPassingFlashAround
functionmanim.ShowPassingFlashAround
def ShowPassingFlashAround(mobject, color=YELLOW, buff=0.1, stroke_width=6, run_time=None, **kwargs)Sweep a temporary border around a target mobject.
Parameters
Target mobject to outline.
Outline color.
Padding between the outline and target.
Outline stroke width.
Optional animation duration override.
Additional animation or styling options.
Returns
The animation, mobject, or computed value produced by ShowPassingFlashAround.
Examples
scene.play(ShowPassingFlashAround(card, color=BLUE))ShrinkToCenter
functionmanim.ShrinkToCenter
def ShrinkToCenter(obj, run_time=None, **kwargs)Shrink To Center function.
Parameters
Obj accepted by ShrinkToCenter.
Run time accepted by ShrinkToCenter.
Kwargs accepted by ShrinkToCenter.
Returns
The animation, mobject, or computed value produced by ShrinkToCenter.
Examples
result = ShrinkToCenter(obj, run_time)sin
functionmanim.sin
def sin(x)Sin math helper.
Parameters
X accepted by sin.
Returns
The animation, mobject, or computed value produced by sin.
Examples
result = sin(x)slow_into
functionmanim.slow_into
def slow_into(t)Slow into easing function.
Parameters
T accepted by slow_into.
Returns
The animation, mobject, or computed value produced by slow_into.
Examples
result = slow_into(t)smooth
functionmanim.smooth
def smooth(t)Smooth easing function.
Parameters
T accepted by smooth.
Returns
The animation, mobject, or computed value produced by smooth.
Examples
result = smooth(t)sqrt
functionmanim.sqrt
def sqrt(x)Sqrt math helper.
Parameters
X accepted by sqrt.
Returns
The animation, mobject, or computed value produced by sqrt.
Examples
result = sqrt(x)squish_rate_func
functionmanim.squish_rate_func
def squish_rate_func(func, a=0.4, b=0.6)Squish rate func function.
Parameters
Func accepted by squish_rate_func.
A accepted by squish_rate_func.
B accepted by squish_rate_func.
Returns
The animation, mobject, or computed value produced by squish_rate_func.
Examples
result = squish_rate_func(func, a)Succession
functionmanim.Succession
def Succession(*animations, run_time=None, **kwargs)Succession function.
Parameters
Animations accepted by Succession.
Run time accepted by Succession.
Kwargs accepted by Succession.
Returns
The animation, mobject, or computed value produced by Succession.
Examples
result = Succession(animations, run_time)SurroundingRectangleWithBuffer
functionmanim.SurroundingRectangleWithBuffer
def SurroundingRectangleWithBuffer(mobject, buff=0.2, **kwargs)Surrounding Rectangle With Buffer function.
Parameters
Mobject accepted by SurroundingRectangleWithBuffer.
Buff accepted by SurroundingRectangleWithBuffer.
Kwargs accepted by SurroundingRectangleWithBuffer.
Returns
The animation, mobject, or computed value produced by SurroundingRectangleWithBuffer.
Examples
result = SurroundingRectangleWithBuffer(mobject, buff)tan
functionmanim.tan
def tan(x)Tan math helper.
Parameters
X accepted by tan.
Returns
The animation, mobject, or computed value produced by tan.
Examples
result = tan(x)there_and_back
functionmanim.there_and_back
def there_and_back(t)There and back easing function.
Parameters
T accepted by there_and_back.
Returns
The animation, mobject, or computed value produced by there_and_back.
Examples
result = there_and_back(t)there_and_back_with_pause
functionmanim.there_and_back_with_pause
def there_and_back_with_pause(t, pause_ratio=1.0 / 3.0)There and back with pause function.
Parameters
T accepted by there_and_back_with_pause.
Pause ratio accepted by there_and_back_with_pause.
Returns
The animation, mobject, or computed value produced by there_and_back_with_pause.
Examples
result = there_and_back_with_pause(t, pause_ratio)Transform
functionmanim.Transform
def Transform(obj, target_mobject, run_time=None, **kwargs)Morph one mobject or group into another target state.
Parameters
Source mobject or group.
Target mobject or group to morph toward.
Optional animation duration override.
Additional transform options such as ``path_arc``.
Returns
A normalized transform descriptor consumed by ``Scene.play``.
Examples
scene.play(Transform(square, circle), run_time=0.8)TransformFromCopy
functionmanim.TransformFromCopy
def TransformFromCopy(obj, target_mobject, run_time=None, **kwargs)Transform From Copy function.
Parameters
Obj accepted by TransformFromCopy.
Target mobject accepted by TransformFromCopy.
Run time accepted by TransformFromCopy.
Kwargs accepted by TransformFromCopy.
Returns
The animation, mobject, or computed value produced by TransformFromCopy.
Examples
scene.play(TransformFromCopy(mobject))TransformMatchingShapes
functionmanim.TransformMatchingShapes
def TransformMatchingShapes(mobject, target_mobject, run_time=None, **kwargs)Approximate Manim's shape-matching transform with a regular transform.
Parameters
Source mobject.
Target mobject to transform into.
Optional animation duration override.
Additional transform options.
Returns
The animation, mobject, or computed value produced by TransformMatchingShapes.
Examples
scene.play(TransformMatchingShapes(title_a, title_b))TransformMatchingStrings
functionmanim.TransformMatchingStrings
def TransformMatchingStrings(*args, **kwargs)Transform Matching Strings function.
Parameters
Args accepted by TransformMatchingStrings.
Kwargs accepted by TransformMatchingStrings.
Returns
The animation, mobject, or computed value produced by TransformMatchingStrings.
Examples
scene.play(TransformMatchingStrings(mobject))TransformMatchingTex
functionmanim.TransformMatchingTex
def TransformMatchingTex(*args, **kwargs)Transform Matching Tex function.
Parameters
Args accepted by TransformMatchingTex.
Kwargs accepted by TransformMatchingTex.
Returns
The animation, mobject, or computed value produced by TransformMatchingTex.
Examples
scene.play(TransformMatchingTex(mobject))Uncreate
functionmanim.Uncreate
def Uncreate(obj, run_time=None, **kwargs)Uncreate function.
Parameters
Obj accepted by Uncreate.
Run time accepted by Uncreate.
Kwargs accepted by Uncreate.
Returns
The animation, mobject, or computed value produced by Uncreate.
Examples
scene.play(Uncreate(mobject))Unwrite
functionmanim.Unwrite
def Unwrite(obj, run_time=None, **kwargs)Unwrite function.
Parameters
Obj accepted by Unwrite.
Run time accepted by Unwrite.
Kwargs accepted by Unwrite.
Returns
The animation, mobject, or computed value produced by Unwrite.
Examples
result = Unwrite(obj, run_time)UpdateFromAlphaFunc
functionmanim.UpdateFromAlphaFunc
def UpdateFromAlphaFunc(mobject, update_func, run_time=None, **kwargs)Update From Alpha Func function.
Parameters
Mobject accepted by UpdateFromAlphaFunc.
Update func accepted by UpdateFromAlphaFunc.
Run time accepted by UpdateFromAlphaFunc.
Kwargs accepted by UpdateFromAlphaFunc.
Returns
The animation, mobject, or computed value produced by UpdateFromAlphaFunc.
Examples
result = UpdateFromAlphaFunc(mobject, update_func)UpdateFromFunc
functionmanim.UpdateFromFunc
def UpdateFromFunc(mobject, update_func, run_time=None, **kwargs)Update From Func function.
Parameters
Mobject accepted by UpdateFromFunc.
Update func accepted by UpdateFromFunc.
Run time accepted by UpdateFromFunc.
Kwargs accepted by UpdateFromFunc.
Returns
The animation, mobject, or computed value produced by UpdateFromFunc.
Examples
result = UpdateFromFunc(mobject, update_func)Wait
functionmanim.Wait
def Wait(run_time=1, **kwargs)Consume time inside animation groups without mutating scene objects.
Parameters
Run time accepted by Wait.
Kwargs accepted by Wait.
Returns
The animation, mobject, or computed value produced by Wait.
Examples
result = Wait(run_time, kwargs)wiggle
functionmanim.wiggle
def wiggle(t, wiggles=2)Wiggle easing function.
Parameters
T accepted by wiggle.
Wiggles accepted by wiggle.
Returns
The animation, mobject, or computed value produced by wiggle.
Examples
result = wiggle(t, wiggles)Wiggle
functionmanim.Wiggle
def Wiggle(obj, angle=PI/8, run_time=None, **kwargs)Wiggle easing function.
Parameters
Obj accepted by Wiggle.
Angle accepted by Wiggle.
Run time accepted by Wiggle.
Kwargs accepted by Wiggle.
Returns
The animation, mobject, or computed value produced by Wiggle.
Examples
result = Wiggle(obj, angle)Write
functionmanim.Write
def Write(obj, run_time=None, **kwargs)Animate text or strokes with a writing-style reveal.
Parameters
Text or stroke-based mobject to reveal.
Optional animation duration override.
Additional animation options passed through to playback.
Returns
A normalized animation descriptor consumed by ``Scene.play``.
Examples
scene.play(Write(Text("Hello world")))Classes
117BackgroundAudioBlock
classdepth 0manim.BackgroundAudioBlock
class BackgroundAudioBlockContext manager for syncing background audio timing
Returns
A BackgroundAudioBlock instance ready to add to a scene or combine with other mobjects.
Examples
obj = BackgroundAudioBlock()CameraFrame
classdepth 0manim.CameraFrame
class CameraFrame(_CameraFrame)3D camera frame wrapper exposed by ``ThreeDScene.camera.frame``.
Parameters
Camera Frame accepted by CameraFrame.
Returns
A CameraFrame instance ready to add to a scene or combine with other mobjects.
Examples
obj = CameraFrame()Cone
classdepth 0manim.Cone
class Cone(_ThreeDBase)Circular cone with a capped base.
Parameters
Radius of the circular base.
Total cone height.
``(u_steps, v_steps)`` mesh sampling density.
Additional style or placement arguments.
Returns
A Cone instance ready to add to a scene or combine with other mobjects.
Examples
cone = Cone(base_radius=0.8, height=1.8, color=ORANGE)Cube
classdepth 0manim.Cube
class Cube(_ThreeDBase)Axis-aligned cube centered at the local origin.
Parameters
Edge length of the cube in scene units.
Additional style or placement arguments.
Returns
A Cube instance ready to add to a scene or combine with other mobjects.
Examples
cube = Cube(side_length=1.8, color=BLUE, fill_opacity=0.4)Cylinder
classdepth 0manim.Cylinder
class Cylinder(_ThreeDBase)Circular cylinder with top and bottom caps.
Parameters
Radius of the cylinder body.
Total cylinder height.
``(u_steps, v_steps)`` mesh sampling density.
Additional style or placement arguments.
Returns
A Cylinder instance ready to add to a scene or combine with other mobjects.
Examples
tube = Cylinder(radius=0.7, height=2.0, color=GREEN)Dot3D
classdepth 0manim.Dot3D
class Dot3D(_ThreeDBase)Small filled 3D marker positioned at a single point.
Parameters
Center point in scene coordinates.
Rendered radius of the dot.
Additional style or placement arguments.
Returns
A Dot3D instance ready to add to a scene or combine with other mobjects.
Examples
marker = Dot3D(point=[0.5, 0.3, 1.2], radius=0.08, color=YELLOW)Line3D
classdepth 0manim.Line3D
class Line3D(_ThreeDBase)Straight 3D segment between explicit start and end points.
Parameters
Segment start point.
Segment end point.
Additional style or placement arguments.
Returns
A Line3D instance ready to add to a scene or combine with other mobjects.
Examples
segment = Line3D(start=[-1, -0.5, 0], end=[1, 0.5, 0.8], color=WHITE)Polyhedron
classdepth 0manim.Polyhedron
class Polyhedron(_ThreeDBase)General 3D mesh built from explicit vertices and polygon faces.
Parameters
Iterable of 3D points.
Iterable of faces, each face being a list of vertex indices.
Additional style or placement arguments.
When ``vertices`` and ``faces`` are omitted, the runtime supplies a visible skewed triangular-prism placeholder mesh.
Returns
A Polyhedron instance ready to add to a scene or combine with other mobjects.
Examples
poly = Polyhedron( vertices=[[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1]], faces=[[0, 1, 2], [0, 1, 3], [0, 2, 3], [1, 2, 3]], color=WHITE,)Prism
classdepth 0manim.Prism
class Prism(_ThreeDBase)Axis-aligned rectangular prism centered at the local origin.
Parameters
``(width, height, depth)`` tuple in scene units.
Additional style or placement arguments.
Returns
A Prism instance ready to add to a scene or combine with other mobjects.
Examples
prism = Prism(dimensions=[1.8, 1.2, 1.0], color=PURPLE)Sphere
classdepth 0manim.Sphere
class Sphere(_ThreeDBase)Triangulated sphere generated from latitude and longitude samples.
Parameters
Sphere radius in scene units.
``(u_steps, v_steps)`` sampling density used to build the mesh.
Additional style or placement arguments.
Returns
A Sphere instance ready to add to a scene or combine with other mobjects.
Examples
globe = Sphere(radius=1.1, resolution=(18, 36), color=TEAL)ThreeDCamera
classdepth 0manim.ThreeDCamera
class ThreeDCamera(_Camera)Perspective camera wrapper exposed by ``ThreeDScene.camera``.
Parameters
Camera accepted by ThreeDCamera.
Returns
A ThreeDCamera instance ready to add to a scene or combine with other mobjects.
Examples
obj = ThreeDCamera()Torus
classdepth 0manim.Torus
class Torus(_ThreeDBase)Donut-shaped surface parameterized by major and minor radii.
Parameters
Distance from the torus center to the tube center.
Radius of the tube cross-section.
``(u_steps, v_steps)`` mesh sampling density.
Additional style or placement arguments.
Returns
A Torus instance ready to add to a scene or combine with other mobjects.
Examples
torus = Torus(major_radius=1.4, minor_radius=0.45, color=PINK)VoiceoverBlock
classdepth 0manim.VoiceoverBlock
class VoiceoverBlockContext manager for syncing animations with voiceover timing
Returns
A VoiceoverBlock instance ready to add to a scene or combine with other mobjects.
Examples
obj = VoiceoverBlock()SurfaceMesh
classdepth 0manim.SurfaceMesh
class SurfaceMesh(_ThreeDBase)Wireframe mesh extracted from a sampled surface.
Parameters
Existing ``Surface`` or ``ParametricSurface`` to sample from.
Optional fallback resolution used when ``surface`` is omitted.
Additional style or placement arguments.
Returns
A SurfaceMesh instance ready to add to a scene or combine with other mobjects.
Examples
surf = Surface(lambda u, v: [u, v, sin(u) * cos(v)])mesh = SurfaceMesh(surf, color=WHITE, stroke_width=1.2)Methods
1update_from_surface
methoddef update_from_surface(self, surface=None)Refresh the wireframe from the latest sampled surface geometry.
Parameters
Surface accepted by update_from_surface.
Returns
The updated SurfaceMesh after calling update_from_surface.
Examples
obj.update_from_surface(surface)Color
classdepth 0manim.Color
class ColorLightweight color wrapper used by compatibility properties.
Returns
A Color instance ready to add to a scene or combine with other mobjects.
Examples
obj = Color()Methods
2to_hex
methoddef to_hex(self)Return the color as a lowercase hex string, e.g. '#0f172a'.
Returns
The updated Color after calling to_hex.
Examples
obj.to_hex()to_rgb
methoddef to_rgb(self)To rgb method.
Returns
The updated Color after calling to_rgb.
Examples
obj.to_rgb()Surface
classdepth 0manim.Surface
class Surface(_ThreeDBase)Sampled parametric surface over a rectangular ``(u, v)`` domain.
Parameters
Callable of ``(u, v)`` returning a 3D point.
Inclusive parameter interval for ``u``.
Inclusive parameter interval for ``v``.
``(u_steps, v_steps)`` mesh sampling density.
Optional alternating face colors applied after mesh generation.
Additional style or placement arguments.
Returns
A Surface instance ready to add to a scene or combine with other mobjects.
Examples
surf = Surface( lambda u, v: [u, v, 0.3 * sin(u) * cos(v)], u_range=[-1.5, 1.5], v_range=[-1.5, 1.5],)Methods
3set_fill_by_checkerboard
methoddef set_fill_by_checkerboard(self, *colors, opacity=None)Apply an alternating checkerboard fill pattern across the surface faces.
Parameters
One or more colors to cycle across adjacent surface patches.
Optional fill opacity override applied with the checkerboard.
Returns
The surface instance for chaining.
Examples
surf.set_fill_by_checkerboard(BLUE_D, BLUE_E, opacity=0.95)set_fill_by_value
methoddef set_fill_by_value(self, *colors, values=None, axis=2, min_value=None, max_value=None, opacity=None, per_face=False)Color the sampled surface from a scalar field.
Parameters
Two or more colors describing the gradient stops.
Optional scalar samples or callable. When omitted, the chosen axis component of each sampled vertex is used.
Axis to sample when ``values`` is omitted.
Optional lower bound for normalization.
Optional upper bound for normalization.
Optional fill opacity override.
Use one color per face center instead of smooth per-vertex interpolation.
Returns
The surface for chaining.
Examples
surf.set_fill_by_value(BLUE_D, GREEN_D, YELLOW_D, RED_D, axis="z")surf.set_fill_by_value( BLUE_D, GREEN_D, YELLOW_D, RED_D, values=lambda x, y, z: z, min_value=-0.4, max_value=0.4,)update_surface
methoddef update_surface(self, func=None, u_range=None, v_range=None, resolution=None, refresh_fill=True)Recompute the current surface mesh in place.
Parameters
Optional replacement ``(u, v) -> point`` callable.
Optional replacement parameter range for ``u``.
Optional replacement parameter range for ``v``.
Optional replacement sampling density.
Reapply the current checkerboard or value-based fill mapping after updating the geometry.
Returns
The surface instance for chaining.
Examples
surface.add_updater(lambda mob, dt: mob.update_surface( lambda u, v: [u, v, wave(u, v, tracker.get_value())]))ThreeDAxes
classdepth 0manim.ThreeDAxes
class ThreeDAxes(_ThreeDBase)Three-dimensional Cartesian axes with coordinate conversion helpers.
Parameters
``(min, max, step)`` tuple for the x-axis.
``(min, max, step)`` tuple for the y-axis.
``(min, max, step)`` tuple for the z-axis.
Rendered x-axis length in scene units.
Rendered y-axis length in scene units.
Rendered z-axis length in scene units.
Shared axis style configuration.
X-axis-specific style overrides.
Y-axis-specific style overrides.
Z-axis-specific style overrides.
Additional style or placement arguments.
Returns
A ThreeDAxes instance ready to add to a scene or combine with other mobjects.
Examples
axes = ThreeDAxes( x_range=[-4, 4, 1], y_range=[-3, 3, 1], z_range=[-4, 4, 1],)Methods
13add
methoddef add(self, *objects)Add method.
Parameters
Objects accepted by add.
Returns
The updated ThreeDAxes after calling add.
Examples
obj.add(objects)add_coordinates
methoddef add_coordinates(self, x_values=None, y_values=None, z_values=None, **kwargs)Attach numeric coordinate labels to the visible 3D axes.
Parameters
Optional explicit x-axis values or value-to-label mapping.
Optional explicit y-axis values or value-to-label mapping.
Optional explicit z-axis values or value-to-label mapping.
Label styling such as ``font_size``, ``color``, and ``buff``.
Returns
The axes instance for chaining. Notes: The origin label ``0`` is omitted so only one visual origin marker is shown where the axes intersect.
Examples
axes.add_coordinates(x_values=[-2, -1, 1, 2], z_values={1: "top"})c2p
methoddef c2p(self, x, y, z=0)Convert 3D axis coordinates into scene points.
Parameters
X-axis coordinate value.
Y-axis coordinate value.
Z-axis coordinate value.
Returns
A 3D point in scene coordinates.
Examples
point = axes.c2p(1.5, -2, 0.5)coords_to_point
methoddef coords_to_point(self, x, y, z=0)Alias for :meth:`c2p` kept for Manim compatibility.
Parameters
X accepted by coords_to_point.
Y accepted by coords_to_point.
Z accepted by coords_to_point.
Returns
The updated ThreeDAxes after calling coords_to_point.
Examples
obj.coords_to_point(x, y)get_axis_labels
methoddef get_axis_labels(self, x_label="x", y_label="y", z_label="z", **kwargs)Return a ``VGroup`` containing x, y, and z axis labels.
Parameters
X label accepted by get_axis_labels.
Y label accepted by get_axis_labels.
Z label accepted by get_axis_labels.
Kwargs accepted by get_axis_labels.
Returns
The updated ThreeDAxes after calling get_axis_labels.
Examples
obj.get_axis_labels(x_label, y_label)get_origin
methoddef get_origin(self)Get origin method.
Returns
The updated ThreeDAxes after calling get_origin.
Examples
obj.get_origin()get_x_axis_label
methoddef get_x_axis_label(self, label, edge=RIGHT, direction=DOWN, buff=0.2, **kwargs)Build a label mobject near the positive end of the x-axis.
Parameters
Label accepted by get_x_axis_label.
Edge accepted by get_x_axis_label.
Direction accepted by get_x_axis_label.
Buff accepted by get_x_axis_label.
Kwargs accepted by get_x_axis_label.
Returns
The updated ThreeDAxes after calling get_x_axis_label.
Examples
obj.get_x_axis_label(label, edge)get_y_axis_label
methoddef get_y_axis_label(self, label, edge=UP, direction=RIGHT, buff=0.2, **kwargs)Build a label mobject near the positive end of the y-axis.
Parameters
Label accepted by get_y_axis_label.
Edge accepted by get_y_axis_label.
Direction accepted by get_y_axis_label.
Buff accepted by get_y_axis_label.
Kwargs accepted by get_y_axis_label.
Returns
The updated ThreeDAxes after calling get_y_axis_label.
Examples
obj.get_y_axis_label(label, edge)get_z_axis_label
methoddef get_z_axis_label(self, label, edge=OUT, direction=(-1, 0, 0.75), buff=0.2, **kwargs)Build a label mobject near the positive end of the z-axis.
Parameters
Label accepted by get_z_axis_label.
Edge accepted by get_z_axis_label.
Direction accepted by get_z_axis_label.
Buff accepted by get_z_axis_label.
Kwargs accepted by get_z_axis_label.
Returns
The updated ThreeDAxes after calling get_z_axis_label.
Examples
obj.get_z_axis_label(label, edge)move_to
methoddef move_to(self, point_or_mobject, **kwargs)Move the target so its center lands on the given point.
Parameters
Point or mobject accepted by move_to.
Kwargs accepted by move_to.
Returns
The updated ThreeDAxes after calling move_to.
Examples
obj.move_to(point_or_mobject, kwargs)plot_parametric_curve
methoddef plot_parametric_curve(self, function, t_range=None, color=None, stroke_width=3, **kwargs)Sample a 3D parametric curve and return it as a path mobject.
Parameters
Callback mapping ``t`` to ``(x, y, z)`` axis coordinates.
``[t_min, t_max]`` or ``[t_min, t_max, step]`` domain.
Optional stroke color.
Optional stroke width.
Additional style arguments.
Returns
A ``VMobject`` whose points are already converted into scene-space coordinates using this axes instance.
Examples
obj.plot_parametric_curve(function, t_range)remove
methoddef remove(self, *objects)Remove method.
Parameters
Objects accepted by remove.
Returns
The updated ThreeDAxes after calling remove.
Examples
obj.remove(objects)shift
methoddef shift(self, vector)Translate the target by the provided vector.
Parameters
Vector accepted by shift.
Returns
The updated ThreeDAxes after calling shift.
Examples
obj.shift(vector)AnimationProxy
classdepth 0manim.AnimationProxy
class AnimationProxyAnimation Proxy class.
Returns
A AnimationProxy instance ready to add to a scene or combine with other mobjects.
Examples
obj = AnimationProxy()Methods
22align_to
methoddef align_to(self, mobject_or_point, direction)Align to method.
Parameters
Mobject or point accepted by align_to.
Direction accepted by align_to.
Returns
The updated AnimationProxy after calling align_to.
Examples
obj.align_to(mobject_or_point, direction)center
methoddef center(self)Center method.
Returns
The updated AnimationProxy after calling center.
Examples
obj.center()increment_value
methoddef increment_value(self, delta)Increment value on the tracked scalar value.
Parameters
Delta accepted by increment_value.
Returns
The updated AnimationProxy after calling increment_value.
Examples
obj.increment_value(delta)move_to
methoddef move_to(self, point)Move the target so its center lands on the given point.
Parameters
Point accepted by move_to.
Returns
The updated AnimationProxy after calling move_to.
Examples
obj.move_to(point)next_to
methoddef next_to(self, mobject_or_point, direction=RIGHT, buff=DEFAULT_MOBJECT_TO_MOBJECT_BUFFER, aligned_edge=ORIGIN)Next to method.
Parameters
Mobject or point accepted by next_to.
Direction accepted by next_to.
Buff accepted by next_to.
Aligned edge accepted by next_to.
Returns
The updated AnimationProxy after calling next_to.
Examples
obj.next_to(mobject_or_point, direction)rotate
methoddef rotate(self, angle, axis=OUT, about_point=None)Rotate the target around a point or axis.
Parameters
Angle accepted by rotate.
Axis accepted by rotate.
About point accepted by rotate.
Returns
The updated AnimationProxy after calling rotate.
Examples
obj.rotate(angle, axis)rotate_about_origin
methoddef rotate_about_origin(self, angle, axis=OUT)Rotate the target around a point or axis.
Parameters
Angle accepted by rotate_about_origin.
Axis accepted by rotate_about_origin.
Returns
The updated AnimationProxy after calling rotate_about_origin.
Examples
obj.rotate_about_origin(angle, axis)scale
methoddef scale(self, factor, about_point=None)Scale the target by a uniform or per-axis factor.
Parameters
Factor accepted by scale.
About point accepted by scale.
Returns
The updated AnimationProxy after calling scale.
Examples
obj.scale(factor, about_point)set
methoddef set(self, **kwargs)Set method.
Parameters
Kwargs accepted by set.
Returns
The updated AnimationProxy after calling set.
Examples
obj.set(kwargs)set_color
methoddef set_color(self, color)Update set color styling on the target.
Parameters
Color accepted by set_color.
Returns
The updated AnimationProxy after calling set_color.
Examples
obj.set_color(color)set_fill
methoddef set_fill(self, color=None, opacity=None)Update set fill styling on the target.
Parameters
Color accepted by set_fill.
Opacity accepted by set_fill.
Returns
The updated AnimationProxy after calling set_fill.
Examples
obj.set_fill(color, opacity)set_opacity
methoddef set_opacity(self, opacity)Update set opacity styling on the target.
Parameters
Opacity accepted by set_opacity.
Returns
The updated AnimationProxy after calling set_opacity.
Examples
obj.set_opacity(opacity)set_run_time
methoddef set_run_time(self, run_time)Set run time method.
Parameters
Run time accepted by set_run_time.
Returns
The updated AnimationProxy after calling set_run_time.
Examples
obj.set_run_time(run_time)set_stroke
methoddef set_stroke(self, color=None, width=None, opacity=None)Update set stroke styling on the target.
Parameters
Color accepted by set_stroke.
Width accepted by set_stroke.
Opacity accepted by set_stroke.
Returns
The updated AnimationProxy after calling set_stroke.
Examples
obj.set_stroke(color, width)set_stroke_width
methoddef set_stroke_width(self, width)Set stroke width method.
Parameters
Width accepted by set_stroke_width.
Returns
The updated AnimationProxy after calling set_stroke_width.
Examples
obj.set_stroke_width(width)set_value
methoddef set_value(self, value)Set value on the tracked scalar value.
Parameters
Value accepted by set_value.
Returns
The updated AnimationProxy after calling set_value.
Examples
obj.set_value(value)set_x
methoddef set_x(self, x, direction=ORIGIN)Set x method.
Parameters
X accepted by set_x.
Direction accepted by set_x.
Returns
The updated AnimationProxy after calling set_x.
Examples
obj.set_x(x, direction)set_y
methoddef set_y(self, y, direction=ORIGIN)Set y method.
Parameters
Y accepted by set_y.
Direction accepted by set_y.
Returns
The updated AnimationProxy after calling set_y.
Examples
obj.set_y(y, direction)set_z
methoddef set_z(self, z, direction=ORIGIN)Set z method.
Parameters
Z accepted by set_z.
Direction accepted by set_z.
Returns
The updated AnimationProxy after calling set_z.
Examples
obj.set_z(z, direction)shift
methoddef shift(self, vector)Translate the target by the provided vector.
Parameters
Vector accepted by shift.
Returns
The updated AnimationProxy after calling shift.
Examples
obj.shift(vector)to_corner
methoddef to_corner(self, corner, buff=0.5)To corner method.
Parameters
Corner accepted by to_corner.
Buff accepted by to_corner.
Returns
The updated AnimationProxy after calling to_corner.
Examples
obj.to_corner(corner, buff)to_edge
methoddef to_edge(self, edge, buff=0.5)To edge method.
Parameters
Edge accepted by to_edge.
Buff accepted by to_edge.
Returns
The updated AnimationProxy after calling to_edge.
Examples
obj.to_edge(edge, buff)Scene
classdepth 0manim.Scene
class SceneTop-level animation container that owns the timeline and exported state.
Parameters
Upper-bound scene duration used before timeline baking resolves the final value.
Output width in pixels.
Output height in pixels.
Scene background color.
Whether to show the debug grid in supported viewers.
Legacy override for backwards compatibility. Prefer compile API fps options.
Returns
A Scene instance ready to add to a scene or combine with other mobjects.
Examples
scene = Scene(width=960, height=540)scene.add(Text("Hello"))scene.wait(1)Methods
23add
methoddef add(self, *objs)Add mobjects to the scene immediately without an animation.
Parameters
Mobjects to register and make visible.
Returns
The scene instance for chaining.
Examples
self.add(objs)add_background_audio
methoddef add_background_audio(self, audio_id, url="", volume=1, mp3="")Add background audio method.
Parameters
Audio id accepted by add_background_audio.
Url accepted by add_background_audio.
Volume accepted by add_background_audio.
Mp3 accepted by add_background_audio.
Returns
Updates the Scene timeline or state after calling add_background_audio.
Examples
self.add_background_audio(audio_id, url)add_fixed_in_frame_mobjects
methoddef add_fixed_in_frame_mobjects(self, *objs)Pin mobjects to the camera frame and add them to the scene.
Parameters
Objs accepted by add_fixed_in_frame_mobjects.
Returns
Updates the Scene timeline or state after calling add_fixed_in_frame_mobjects.
Examples
self.add_fixed_in_frame_mobjects(objs)add_fixed_orientation_mobjects
methoddef add_fixed_orientation_mobjects(self, *objs)Add fixed orientation mobjects method.
Parameters
Objs accepted by add_fixed_orientation_mobjects.
Returns
Updates the Scene timeline or state after calling add_fixed_orientation_mobjects.
Examples
self.add_fixed_orientation_mobjects(objs)add_image_asset
methoddef add_image_asset(self, image_id, url="", width=0, height=0, kind="image", mimeType="", path="")Add image asset method.
Parameters
Image id accepted by add_image_asset.
Url accepted by add_image_asset.
Width accepted by add_image_asset.
Height accepted by add_image_asset.
Kind accepted by add_image_asset.
Mime Type accepted by add_image_asset.
Path accepted by add_image_asset.
Returns
Updates the Scene timeline or state after calling add_image_asset.
Examples
self.add_image_asset(image_id, url)clear
methoddef clear(self)Hide all currently visible scene mobjects, including fixed overlays.
Returns
Updates the Scene timeline or state after calling clear.
Examples
self.clear()clear_content
methoddef clear_content(self)Hide non-fixed scene content while preserving fixed-frame overlays.
Returns
Updates the Scene timeline or state after calling clear_content.
Examples
self.clear_content()clear_fixed_in_frame_mobjects
methoddef clear_fixed_in_frame_mobjects(self)Hide fixed-frame overlays from the current timeline time onward.
Returns
Updates the Scene timeline or state after calling clear_fixed_in_frame_mobjects.
Examples
self.clear_fixed_in_frame_mobjects()construct
methoddef construct(self)Construct method.
Returns
Updates the Scene timeline or state after calling construct.
Examples
self.construct()export
methoddef export(self)Export method.
Returns
Updates the Scene timeline or state after calling export.
Examples
self.export()fade_out_all
methoddef fade_out_all(self, run_time=1, rate_func=None, preserve_fixed_in_frame=False)Fade out all currently visible scene mobjects.
Parameters
Duration of the fade.
Optional easing callback.
Keep fixed-frame overlays visible when true.
Returns
The scene instance for chaining.
Examples
self.fade_out_all(run_time, rate_func)get_image_asset
methoddef get_image_asset(self, image_id, default=None)Get image asset method.
Parameters
Image id accepted by get_image_asset.
Default accepted by get_image_asset.
Returns
Updates the Scene timeline or state after calling get_image_asset.
Examples
self.get_image_asset(image_id, default)move_camera
methoddef move_camera(self, position=None, zoom=None, run_time=1, rate_func=None)Animate the 2D camera frame position and zoom.
Parameters
Optional point the camera frame should move to.
Optional target zoom level. Internally this is converted into the scale factor required by the camera frame.
Animation duration in seconds.
Optional easing callback forwarded to ``play``.
Returns
The scene instance for chaining.
Examples
scene.move_camera(position=RIGHT * 2, run_time=1.0)scene.move_camera(position=ORIGIN, zoom=1.4, rate_func=smooth)play
methoddef play(self, *animations, run_time=1, rate_func=None, run_func=None, lag_ratio=0, **kwargs)Schedule one or more animations onto the scene timeline.
Parameters
Animation objects, animation groups, or animate proxies.
Default duration used when an animation does not set one.
Optional easing callback.
Alias accepted for compatibility with older code.
Offset ratio applied when sequencing multiple animations.
Additional animation keyword arguments such as easing hints.
Returns
The scene instance for chaining.
Examples
scene.play(Create(circle), run_time=1.2)scene.play(square.animate.shift(RIGHT * 2), rate_func=linear)play_background_audio_block
methoddef play_background_audio_block(self, audio_id, volume=None, fade_in=0, fade_out=0, loop=False)Play background audio block method.
Parameters
Audio id accepted by play_background_audio_block.
Volume accepted by play_background_audio_block.
Fade in accepted by play_background_audio_block.
Fade out accepted by play_background_audio_block.
Loop accepted by play_background_audio_block.
Returns
Updates the Scene timeline or state after calling play_background_audio_block.
Examples
self.play_background_audio_block(audio_id, volume)remove
methoddef remove(self, *objs)Hide mobjects from the current timeline time onward.
Parameters
Objs accepted by remove.
Returns
Updates the Scene timeline or state after calling remove.
Examples
self.remove(objs)remove_fixed_in_frame_mobjects
methoddef remove_fixed_in_frame_mobjects(self, *objs)Release pinned mobjects into world space without a visible jump.
Parameters
Objs accepted by remove_fixed_in_frame_mobjects.
Returns
Updates the Scene timeline or state after calling remove_fixed_in_frame_mobjects.
Examples
self.remove_fixed_in_frame_mobjects(objs)reset_camera
methoddef reset_camera(self, run_time=0, rate_func=None)Restore the camera to the scene's captured initial camera state.
Parameters
Run time accepted by reset_camera.
Rate func accepted by reset_camera.
Returns
Updates the Scene timeline or state after calling reset_camera.
Examples
self.reset_camera(run_time, rate_func)set_background_audios
methoddef set_background_audios(self, audio_map)Set background audios method.
Parameters
Audio map accepted by set_background_audios.
Returns
Updates the Scene timeline or state after calling set_background_audios.
Examples
self.set_background_audios(audio_map)set_images
methoddef set_images(self, image_map)Set images method.
Parameters
Image map accepted by set_images.
Returns
Updates the Scene timeline or state after calling set_images.
Examples
self.set_images(image_map)tear_down
methoddef tear_down(self)Tear down method.
Returns
Updates the Scene timeline or state after calling tear_down.
Examples
self.tear_down()wait
methoddef wait(self, duration=1)Advance the scene clock without adding a new animation.
Parameters
Number of seconds to advance the scene clock.
Returns
The scene instance for chaining.
Examples
self.wait(duration)zoom_camera
methoddef zoom_camera(self, zoom=None, factor=None, run_time=1, rate_func=None)Zoom camera method.
Parameters
Zoom accepted by zoom_camera.
Factor accepted by zoom_camera.
Run time accepted by zoom_camera.
Rate func accepted by zoom_camera.
Returns
Updates the Scene timeline or state after calling zoom_camera.
Examples
self.zoom_camera(zoom, factor)MathObject
classdepth 0manim.MathObject
class MathObjectBase class for drawable objects in the Manim Web runtime.
Returns
A MathObject instance ready to add to a scene or combine with other mobjects.
Examples
obj = MathObject()Methods
65add
methoddef add(self, *objects)Attach one or more submobjects to this mobject.
Parameters
Objects accepted by add.
Returns
The updated MathObject after calling add.
Examples
obj.add(objects)add_updater
methoddef add_updater(self, updater)Register a callback that runs while the scene timeline advances.
Parameters
Updater accepted by add_updater.
Returns
The updated MathObject after calling add_updater.
Examples
obj.add_updater(updater)align_to
methoddef align_to(self, mobject_or_point, direction)Align to method.
Parameters
Mobject or point accepted by align_to.
Direction accepted by align_to.
Returns
The updated MathObject after calling align_to.
Examples
obj.align_to(mobject_or_point, direction)append_points
methoddef append_points(self, points)Append points method.
Parameters
Points accepted by append_points.
Returns
The updated MathObject after calling append_points.
Examples
obj.append_points(points)become
methoddef become(self, mobject, match_center=False)Become method.
Parameters
Mobject accepted by become.
Match center accepted by become.
Returns
The updated MathObject after calling become.
Examples
obj.become(circle, match_center)center
methoddef center(self)Manim convenience alias: move the mobject to the origin and return self. Enables chaining like .arrange(...).center().shift(...).
Returns
The updated MathObject after calling center.
Examples
obj.center()clear_updaters
methoddef clear_updaters(self)Disable all previously registered updater callbacks.
Returns
The updated MathObject after calling clear_updaters.
Examples
obj.clear_updaters()family_members_with_points
methoddef family_members_with_points(self)Return family members that currently contribute visible geometry.
Returns
The updated MathObject after calling family_members_with_points.
Examples
obj.family_members_with_points()generate_target
methoddef generate_target(self)Generate target method.
Returns
The updated MathObject after calling generate_target.
Examples
obj.generate_target()get_bottom
methoddef get_bottom(self)Get bottom method.
Returns
The updated MathObject after calling get_bottom.
Examples
obj.get_bottom()get_center
methoddef get_center(self, query_time=None)Return the object center, optionally sampled at a specific timeline time.
Parameters
Optional timeline time to sample against.
Returns
A 3D point tuple representing the object center.
Examples
obj.get_center(query_time)get_color
methoddef get_color(self)Get color method.
Returns
The updated MathObject after calling get_color.
Examples
obj.get_color()get_coord
methoddef get_coord(self, dim)Return the coordinate of the mobject center along one dimension.
Parameters
Coordinate index ``0`` for x, ``1`` for y, or ``2`` for z.
Returns
The numeric coordinate value. Invalid indices fall back to ``0``.
Examples
obj.get_coord(dim)get_corner
methoddef get_corner(self, direction)Get corner method.
Parameters
Direction accepted by get_corner.
Returns
The updated MathObject after calling get_corner.
Examples
obj.get_corner(direction)get_edge_center
methoddef get_edge_center(self, direction)Get edge center method.
Parameters
Direction accepted by get_edge_center.
Returns
The updated MathObject after calling get_edge_center.
Examples
obj.get_edge_center(direction)get_end
methoddef get_end(self)Get end method.
Returns
The updated MathObject after calling get_end.
Examples
obj.get_end()get_family
methoddef get_family(self)Return this mobject and all descendant mobjects as a flat list.
Returns
The updated MathObject after calling get_family.
Examples
obj.get_family()get_fill_color
methoddef get_fill_color(self)Get fill color method.
Returns
The updated MathObject after calling get_fill_color.
Examples
obj.get_fill_color()get_fill_opacity
methoddef get_fill_opacity(self)Get fill opacity method.
Returns
The updated MathObject after calling get_fill_opacity.
Examples
obj.get_fill_opacity()get_left
methoddef get_left(self)Get left method.
Returns
The updated MathObject after calling get_left.
Examples
obj.get_left()get_opacity
methoddef get_opacity(self)Get opacity method.
Returns
The updated MathObject after calling get_opacity.
Examples
obj.get_opacity()get_property
methoddef get_property(self, name)Get property method.
Parameters
Name accepted by get_property.
Returns
The updated MathObject after calling get_property.
Examples
obj.get_property(name)get_right
methoddef get_right(self)Get right method.
Returns
The updated MathObject after calling get_right.
Examples
obj.get_right()get_start
methoddef get_start(self)Get start method.
Returns
The updated MathObject after calling get_start.
Examples
obj.get_start()get_stroke_color
methoddef get_stroke_color(self)Get stroke color method.
Returns
The updated MathObject after calling get_stroke_color.
Examples
obj.get_stroke_color()get_stroke_opacity
methoddef get_stroke_opacity(self)Get stroke opacity method.
Returns
The updated MathObject after calling get_stroke_opacity.
Examples
obj.get_stroke_opacity()get_top
methoddef get_top(self)Get top method.
Returns
The updated MathObject after calling get_top.
Examples
obj.get_top()get_updaters
methoddef get_updaters(self)Return the currently active updater callbacks registered on this mobject.
Returns
The updated MathObject after calling get_updaters.
Examples
obj.get_updaters()get_x
methoddef get_x(self)Return the x-coordinate of the mobject center.
Returns
The updated MathObject after calling get_x.
Examples
obj.get_x()get_y
methoddef get_y(self)Return the y-coordinate of the mobject center.
Returns
The updated MathObject after calling get_y.
Examples
obj.get_y()get_z
methoddef get_z(self)Return the z-coordinate of the mobject center.
Returns
The updated MathObject after calling get_z.
Examples
obj.get_z()has_points
methoddef has_points(self)Has points method.
Returns
The updated MathObject after calling has_points.
Examples
obj.has_points()move_to
methoddef move_to(self, point_or_mobject, aligned_edge=None, **kwargs)Move the object center to a point or another mobject's center.
Parameters
Target point or mobject to align to.
Optional corner direction used for aligned placement.
Accepted for API compatibility.
Returns
The mutated mobject so calls can be chained.
Examples
obj.move_to(point_or_mobject, aligned_edge)next_to
methoddef next_to( self, mobject_or_point, direction=RIGHT, buff=DEFAULT_MOBJECT_TO_MOBJECT_BUFFER, aligned_edge=ORIGIN, )Place the object next to another object or point with a buffer.
Parameters
Reference object or point.
Placement direction relative to the reference.
Spacing between the reference and this object.
Optional secondary edge alignment. Defaults to ORIGIN, which keeps the object centered on the perpendicular axis unless an edge such as LEFT, RIGHT, UP, or DOWN is provided.
Returns
The mutated mobject so calls can be chained.
Examples
obj.next_to(mobject_or_point, direction)point_from_proportion
methoddef point_from_proportion(self, alpha)Point from proportion method.
Parameters
Alpha accepted by point_from_proportion.
Returns
The updated MathObject after calling point_from_proportion.
Examples
obj.point_from_proportion(alpha)remove
methoddef remove(self, *objects)Remove method.
Parameters
Objects accepted by remove.
Returns
The updated MathObject after calling remove.
Examples
obj.remove(objects)remove_updater
methoddef remove_updater(self, updater)Remove updater method.
Parameters
Updater accepted by remove_updater.
Returns
The updated MathObject after calling remove_updater.
Examples
obj.remove_updater(updater)rotate
methoddef rotate(self, angle, axis=OUT, about_point=None)Rotate the object, optionally around an explicit pivot.
Parameters
Rotation amount in radians.
Rotation axis vector (3D compatibility).
Optional pivot used for orbit-style rotation.
Returns
The mutated mobject so calls can be chained.
Examples
obj.rotate(angle, axis)rotate_about_origin
methoddef rotate_about_origin(self, angle, axis=OUT)Rotate the object around the scene origin.
Parameters
Angle accepted by rotate_about_origin.
Axis accepted by rotate_about_origin.
Returns
The updated MathObject after calling rotate_about_origin.
Examples
obj.rotate_about_origin(angle, axis)scale
methoddef scale(self, factor, about_point=None)Scale the object, optionally around an explicit pivot.
Parameters
Scalar or per-axis scale value.
Optional pivot used for orbit-style scaling.
Returns
The mutated mobject so calls can be chained.
Examples
obj.scale(factor, about_point)set_color
methoddef set_color(self, color)Update set color styling on the target.
Parameters
Color accepted by set_color.
Returns
The updated MathObject after calling set_color.
Examples
obj.set_color(color)set_coord
methoddef set_coord(self, value, dim, direction=ORIGIN)Move the mobject so a chosen coordinate matches ``value``.
Parameters
Target coordinate value.
Coordinate index ``0`` for x, ``1`` for y, or ``2`` for z.
Alignment direction. ``ORIGIN`` aligns the center, while axis directions such as ``LEFT`` or ``UP`` align the corresponding edge similarly to Manim.
Returns
The mutated mobject so calls can be chained.
Examples
obj.set_coord(value, dim)set_fill
methoddef set_fill(self, color=None, opacity=None)Update set fill styling on the target.
Parameters
Color accepted by set_fill.
Opacity accepted by set_fill.
Returns
The updated MathObject after calling set_fill.
Examples
obj.set_fill(color, opacity)set_fill_by_radial_gradient
methoddef set_fill_by_radial_gradient(self, *colors)Apply a radial fill gradient to shapes like Circle and Ellipse.
Parameters
Colors accepted by set_fill_by_radial_gradient.
Returns
The updated MathObject after calling set_fill_by_radial_gradient.
Examples
obj.set_fill_by_radial_gradient(colors)set_fill_opacity
methoddef set_fill_opacity(self, opacity)Set fill opacity method.
Parameters
Opacity accepted by set_fill_opacity.
Returns
The updated MathObject after calling set_fill_opacity.
Examples
obj.set_fill_opacity(opacity)set_height
methoddef set_height(self, height, stretch=False)Resize the mobject to the requested height.
Parameters
Target height in scene units.
When ``True``, only stretch the y-axis. Otherwise apply uniform scaling like Manim's default ``set_height`` behavior.
Returns
The updated MathObject after calling set_height.
Examples
obj.set_height(height, stretch)set_opacity
methoddef set_opacity(self, opacity)Update set opacity styling on the target.
Parameters
Opacity accepted by set_opacity.
Returns
The updated MathObject after calling set_opacity.
Examples
obj.set_opacity(opacity)set_property
methoddef set_property(self, name, value)Set property method.
Parameters
Name accepted by set_property.
Value accepted by set_property.
Returns
The updated MathObject after calling set_property.
Examples
obj.set_property(name, value)set_stroke
methoddef set_stroke(self, color=None, width=None, opacity=None)Update set stroke styling on the target.
Parameters
Color accepted by set_stroke.
Width accepted by set_stroke.
Opacity accepted by set_stroke.
Returns
The updated MathObject after calling set_stroke.
Examples
obj.set_stroke(color, width)set_stroke_width
methoddef set_stroke_width(self, width)Set stroke width method.
Parameters
Width accepted by set_stroke_width.
Returns
The updated MathObject after calling set_stroke_width.
Examples
obj.set_stroke_width(width)set_width
methoddef set_width(self, width, stretch=False)Resize the mobject to the requested width.
Parameters
Target width in scene units.
When ``True``, only stretch the x-axis. Otherwise apply uniform scaling like Manim's default ``set_width`` behavior.
Returns
The updated MathObject after calling set_width.
Examples
obj.set_width(width, stretch)set_x
methoddef set_x(self, x, direction=ORIGIN)Move the mobject so its x-coordinate matches ``x``.
Parameters
X accepted by set_x.
Direction accepted by set_x.
Returns
The updated MathObject after calling set_x.
Examples
obj.set_x(x, direction)set_y
methoddef set_y(self, y, direction=ORIGIN)Move the mobject so its y-coordinate matches ``y``.
Parameters
Y accepted by set_y.
Direction accepted by set_y.
Returns
The updated MathObject after calling set_y.
Examples
obj.set_y(y, direction)set_z
methoddef set_z(self, z, direction=ORIGIN)Move the mobject so its z-coordinate matches ``z``.
Parameters
Z accepted by set_z.
Direction accepted by set_z.
Returns
The updated MathObject after calling set_z.
Examples
obj.set_z(z, direction)shift
methoddef shift(self, vector)Translate the object by a vector in scene coordinates.
Parameters
Translation vector expressed in scene coordinates.
Returns
The mutated mobject so calls can be chained.
Examples
obj.shift(vector)to_bottom
methoddef to_bottom(self, buff=0.5)To bottom method.
Parameters
Buff accepted by to_bottom.
Returns
The updated MathObject after calling to_bottom.
Examples
obj.to_bottom(buff)to_corner
methoddef to_corner(self, corner, buff=0.5)Move the object to a frame corner while respecting its own bounds.
Parameters
Corner direction such as ``UL`` or ``DR``.
Margin to keep from the corner.
Returns
The mutated mobject so calls can be chained.
Examples
obj.to_corner(corner, buff)to_dl
methoddef to_dl(self, buff=0.5)To dl method.
Parameters
Buff accepted by to_dl.
Returns
The updated MathObject after calling to_dl.
Examples
obj.to_dl(buff)to_dr
methoddef to_dr(self, buff=0.5)To dr method.
Parameters
Buff accepted by to_dr.
Returns
The updated MathObject after calling to_dr.
Examples
obj.to_dr(buff)to_edge
methoddef to_edge(self, edge, buff=0.5)Move the object to a frame edge while respecting its own bounds.
Parameters
Direction of the frame edge to align to.
Margin to keep from the edge.
Returns
The mutated mobject so calls can be chained.
Examples
obj.to_edge(edge, buff)to_left
methoddef to_left(self, buff=0.5)To left method.
Parameters
Buff accepted by to_left.
Returns
The updated MathObject after calling to_left.
Examples
obj.to_left(buff)to_right
methoddef to_right(self, buff=0.5)To right method.
Parameters
Buff accepted by to_right.
Returns
The updated MathObject after calling to_right.
Examples
obj.to_right(buff)to_top
methoddef to_top(self, buff=0.5)To top method.
Parameters
Buff accepted by to_top.
Returns
The updated MathObject after calling to_top.
Examples
obj.to_top(buff)to_ul
methoddef to_ul(self, buff=0.5)To ul method.
Parameters
Buff accepted by to_ul.
Returns
The updated MathObject after calling to_ul.
Examples
obj.to_ul(buff)to_ur
methoddef to_ur(self, buff=0.5)To ur method.
Parameters
Buff accepted by to_ur.
Returns
The updated MathObject after calling to_ur.
Examples
obj.to_ur(buff)Arc
classdepth 1manim.Arc
class Arc(MathObject)Circular arc matching Manim's Arc constructor shape semantics.
Parameters
Math Object accepted by Arc.
Returns
A Arc instance ready to add to a scene or combine with other mobjects.
Examples
obj = Arc()Arrow
classdepth 1manim.Arrow
class Arrow(MathObject)Line segment with an arrow tip oriented toward the end point.
Parameters
Start point of the arrow shaft.
End point of the arrow shaft.
Additional style or placement arguments.
Returns
A Arrow instance ready to add to a scene or combine with other mobjects.
Examples
arrow = Arrow(LEFT, RIGHT, color=YELLOW)Arrow3D
classdepth 1manim.Arrow3D
class Arrow3D(Line3D)3D line segment with an arrow tip at the end point.
Parameters
Arrow tail point.
Arrow tip anchor point.
Length of the rendered arrow tip.
Width of the rendered arrow tip.
Additional style or placement arguments.
Returns
A Arrow3D instance ready to add to a scene or combine with other mobjects.
Examples
obj = Arrow3D()ConvexHull3D
classdepth 1manim.ConvexHull3D
class ConvexHull3D(Polyhedron)Convex Hull3 D class.
Parameters
Polyhedron accepted by ConvexHull3D.
Returns
A ConvexHull3D instance ready to add to a scene or combine with other mobjects.
Examples
obj = ConvexHull3D()CubicBezier
classdepth 1manim.CubicBezier
class CubicBezier(MathObject)Cubic Bezier curve defined by four control points.
Parameters
Math Object accepted by CubicBezier.
Returns
A CubicBezier instance ready to add to a scene or combine with other mobjects.
Examples
obj = CubicBezier()Dodecahedron
classdepth 1manim.Dodecahedron
class Dodecahedron(Polyhedron)Regular dodecahedron convenience polyhedron.
Parameters
Polyhedron accepted by Dodecahedron.
Returns
A Dodecahedron instance ready to add to a scene or combine with other mobjects.
Examples
obj = Dodecahedron()FunctionGraph
classdepth 1manim.FunctionGraph
class FunctionGraph(MathObject)Function Graph class.
Parameters
Math Object accepted by FunctionGraph.
Returns
A FunctionGraph instance ready to add to a scene or combine with other mobjects.
Examples
obj = FunctionGraph()Icosahedron
classdepth 1manim.Icosahedron
class Icosahedron(Polyhedron)Regular icosahedron convenience polyhedron.
Parameters
Polyhedron accepted by Icosahedron.
Returns
A Icosahedron instance ready to add to a scene or combine with other mobjects.
Examples
obj = Icosahedron()ImageMobject
classdepth 1manim.ImageMobject
class ImageMobject(MathObject)Raster image loaded from the user workspace or scene asset map.
Parameters
File path or URL-like source string.
Optional image asset id from the scene asset map.
Optional rendered width.
Optional rendered height.
Asset kind metadata.
Optional MIME type metadata.
Additional style or placement arguments.
Returns
A ImageMobject instance ready to add to a scene or combine with other mobjects.
Examples
logo = ImageMobject("assets/logo.png").scale(0.8)ImplicitFunction
classdepth 1manim.ImplicitFunction
class ImplicitFunction(MathObject)Implicit Function class.
Parameters
Math Object accepted by ImplicitFunction.
Returns
A ImplicitFunction instance ready to add to a scene or combine with other mobjects.
Examples
obj = ImplicitFunction()Line
classdepth 1manim.Line
class Line(MathObject)Straight segment defined by explicit start and end points.
Parameters
Start point of the segment.
End point of the segment.
Additional style or placement arguments.
Returns
A Line instance ready to add to a scene or combine with other mobjects.
Examples
obj = Line()Mobject
classdepth 1manim.Mobject
class Mobject(MathObject)Mobject class.
Parameters
Math Object accepted by Mobject.
Returns
A Mobject instance ready to add to a scene or combine with other mobjects.
Examples
obj = Mobject()MovingCameraScene
classdepth 1manim.MovingCameraScene
class MovingCameraScene(Scene)MovingCameraScene scene class.
Parameters
Scene accepted by MovingCameraScene.
Returns
A MovingCameraScene instance ready to add to a scene or combine with other mobjects.
Examples
class Demo(MovingCameraScene): def construct(self): passNumberLine
classdepth 1manim.NumberLine
class NumberLine(MathObject)Number Line class.
Parameters
Math Object accepted by NumberLine.
Returns
A NumberLine instance ready to add to a scene or combine with other mobjects.
Examples
obj = NumberLine()Octahedron
classdepth 1manim.Octahedron
class Octahedron(Polyhedron)Regular octahedron convenience polyhedron.
Parameters
Polyhedron accepted by Octahedron.
Returns
A Octahedron instance ready to add to a scene or combine with other mobjects.
Examples
obj = Octahedron()ParametricFunction
classdepth 1manim.ParametricFunction
class ParametricFunction(MathObject)Curve generated by sampling a callable or expression over ``t_range``.
Parameters
Math Object accepted by ParametricFunction.
Returns
A ParametricFunction instance ready to add to a scene or combine with other mobjects.
Examples
obj = ParametricFunction()ParametricSurface
classdepth 1manim.ParametricSurface
class ParametricSurface(Surface)Alias of :class:`Surface` kept for Manim API compatibility.
Parameters
Surface accepted by ParametricSurface.
Returns
A ParametricSurface instance ready to add to a scene or combine with other mobjects.
Examples
obj = ParametricSurface()Polygon
classdepth 1manim.Polygon
class Polygon(MathObject)Polygon class.
Parameters
Math Object accepted by Polygon.
Returns
A Polygon instance ready to add to a scene or combine with other mobjects.
Examples
obj = Polygon()Rectangle
classdepth 1manim.Rectangle
class Rectangle(MathObject)Axis-aligned rectangle parameterized by width and height.
Parameters
Rectangle width in scene units.
Rectangle height in scene units.
Internal type override used by subclasses.
Additional style or placement arguments.
Returns
A Rectangle instance ready to add to a scene or combine with other mobjects.
Examples
obj = Rectangle()RegularPolygon
classdepth 1manim.RegularPolygon
class RegularPolygon(MathObject)Regular Polygon class.
Parameters
Math Object accepted by RegularPolygon.
Returns
A RegularPolygon instance ready to add to a scene or combine with other mobjects.
Examples
obj = RegularPolygon()Square
classdepth 1manim.Square
class Square(MathObject)Square mobject sampled densely for smoother morphing.
Parameters
Edge length in scene units.
Additional style or placement arguments.
Returns
A Square instance ready to add to a scene or combine with other mobjects.
Examples
square = Square(side_length=2).set_color(WHITE)Tetrahedron
classdepth 1manim.Tetrahedron
class Tetrahedron(Polyhedron)Regular tetrahedron convenience polyhedron.
Parameters
Polyhedron accepted by Tetrahedron.
Returns
A Tetrahedron instance ready to add to a scene or combine with other mobjects.
Examples
obj = Tetrahedron()Tex
classdepth 1manim.Tex
class Tex(MathObject)LaTeX-like text mobject represented as a single tex string.
Parameters
TeX source string.
Text size in pixels.
Snake-case alias for ``fontSize``.
Additional style or placement arguments.
Returns
A Tex instance ready to add to a scene or combine with other mobjects.
Examples
obj = Tex()Triangle
classdepth 1manim.Triangle
class Triangle(MathObject)Triangle class.
Parameters
Math Object accepted by Triangle.
Returns
A Triangle instance ready to add to a scene or combine with other mobjects.
Examples
obj = Triangle()Text
classdepth 1manim.Text
class Text(MathObject)Plain text mobject rendered with the runtime text renderer.
Parameters
Display string.
Text size in pixels.
Snake-case alias for ``fontSize``.
Additional style or placement arguments.
Returns
A Text instance ready to add to a scene or combine with other mobjects.
Examples
title = Text("Polar Symmetry", font_size=48, color=BLUE)Methods
1get_text
methoddef get_text(self)Get text method.
Returns
The updated Text after calling get_text.
Examples
obj.get_text()Circle
classdepth 1manim.Circle
class Circle(MathObject)Circular outline or filled shape with Manim-style defaults.
Parameters
Circle radius in scene units.
Additional style or placement arguments.
Returns
A Circle instance ready to add to a scene or combine with other mobjects.
Examples
circle = Circle(radius=1.5, color=BLUE)Methods
2get_radius
methoddef get_radius(self)Get radius method.
Returns
The updated Circle after calling get_radius.
Examples
obj.get_radius()point_at_angle
methoddef point_at_angle(self, angle_radians)Point at angle method.
Parameters
Angle radians accepted by point_at_angle.
Returns
The updated Circle after calling point_at_angle.
Examples
obj.point_at_angle(angle_radians)DecimalNumber
classdepth 1manim.DecimalNumber
class DecimalNumber(MathObject)Decimal Number class.
Parameters
Math Object accepted by DecimalNumber.
Returns
A DecimalNumber instance ready to add to a scene or combine with other mobjects.
Examples
obj = DecimalNumber()Methods
2get_value
methoddef get_value(self)Get value on the tracked scalar value.
Returns
The updated DecimalNumber after calling get_value.
Examples
obj.get_value()set_value
methoddef set_value(self, value)Set value on the tracked scalar value.
Parameters
Value accepted by set_value.
Returns
The updated DecimalNumber after calling set_value.
Examples
obj.set_value(value)ValueTracker
classdepth 1manim.ValueTracker
class ValueTracker(MathObject)Numeric container used to drive animations and redraw callbacks.
Parameters
Initial numeric value.
Additional mobject configuration.
Returns
A ValueTracker instance ready to add to a scene or combine with other mobjects.
Examples
tracker = ValueTracker(0)scene.play(tracker.animate.set_value(10))Methods
3get_value
methoddef get_value(self)Get value on the tracked scalar value.
Returns
The updated ValueTracker after calling get_value.
Examples
obj.get_value()increment_value
methoddef increment_value(self, delta)Increment value on the tracked scalar value.
Parameters
Delta accepted by increment_value.
Returns
The updated ValueTracker after calling increment_value.
Examples
obj.increment_value(delta)set_value
methoddef set_value(self, value)Set value on the tracked scalar value.
Parameters
Value accepted by set_value.
Returns
The updated ValueTracker after calling set_value.
Examples
obj.set_value(value)Brace
classdepth 1manim.Brace
class Brace(MathObject)Brace class.
Parameters
Math Object accepted by Brace.
Returns
A Brace instance ready to add to a scene or combine with other mobjects.
Examples
obj = Brace()Methods
4get_direction
methoddef get_direction(self)Get direction method.
Returns
The updated Brace after calling get_direction.
Examples
obj.get_direction()get_text
methoddef get_text(self, text, **kwargs)Get text method.
Parameters
Text accepted by get_text.
Kwargs accepted by get_text.
Returns
The updated Brace after calling get_text.
Examples
obj.get_text(text, kwargs)get_tip
methoddef get_tip(self)Get tip method.
Returns
The updated Brace after calling get_tip.
Examples
obj.get_tip()put_at_tip
methoddef put_at_tip(self, mob, use_next_to=True, **kwargs)Put at tip method.
Parameters
Mob accepted by put_at_tip.
Use next to accepted by put_at_tip.
Kwargs accepted by put_at_tip.
Returns
The updated Brace after calling put_at_tip.
Examples
obj.put_at_tip(mob, use_next_to)ThreeDScene
classdepth 1manim.ThreeDScene
class ThreeDScene(Scene)3D scene with perspective camera controls compatible with Manim-style APIs.
Parameters
Scene accepted by ThreeDScene.
Returns
A ThreeDScene instance ready to add to a scene or combine with other mobjects.
Examples
class OrbitScene(ThreeDScene): def construct(self): self.set_camera_orientation(phi=70 * DEGREES, theta=-45 * DEGREES) self.add(ThreeDAxes(), Cube())Methods
4begin_ambient_camera_rotation
methoddef begin_ambient_camera_rotation(self, rate=0.02, **kwargs)Start a persistent camera updater that rotates the 3D frame.
Parameters
Angular speed in radians per second.
Supports ``about="theta"``, ``"phi"``, or ``"gamma"`` to choose which camera angle is animated.
Returns
The scene instance for chaining.
Examples
self.begin_ambient_camera_rotation(rate=0.12)self.begin_ambient_camera_rotation(rate=0.05, about="phi")move_camera
methoddef move_camera( self, phi=None, theta=None, gamma=None, zoom=None, focal_distance=None, distance=None, frame_center=None, run_time=1, rate_func=None, **kwargs )Animate the 3D camera frame from its current pose to a new pose.
Parameters
Target polar angle in radians. Leave unset to keep the current vertical viewing angle.
Target azimuthal angle in radians around the scene.
Target roll angle around the viewing axis.
Target zoom factor for the camera frame.
Target perspective focal distance.
Target camera distance from the frame center.
Optional point that the camera frame should move to while the orientation change is playing.
Animation duration in seconds.
Optional easing callback passed through to ``play``.
Compatibility aliases such as ``distance``.
Returns
The scene instance, so calls can be chained.
Examples
self.move_camera(phi=75 * DEGREES, theta=-PI / 3, run_time=1.5)self.move_camera(theta=-PI / 3, distance=7, run_time=1.2)self.move_camera(frame_center=ORIGIN, zoom=1.4, rate_func=smooth)set_camera_orientation
methoddef set_camera_orientation(self, phi=None, theta=None, gamma=None, zoom=None, focal_distance=None, distance=None, **kwargs)Set the active 3D camera orientation immediately.
Parameters
Polar angle of the camera.
Azimuthal angle of the camera.
Roll angle around the viewing axis.
Camera zoom factor.
Perspective focal distance.
Distance from the camera to the frame center.
Compatibility aliases such as ``distance``.
Returns
The scene instance for chaining.
Examples
self.set_camera_orientation(phi, theta)stop_ambient_camera_rotation
methoddef stop_ambient_camera_rotation(self, about="theta")Stop a previously registered ambient camera rotation updater.
Parameters
Axis name used when the rotation was started. Invalid values fall back to the last active axis tracked by the scene.
Returns
The scene instance for chaining.
Examples
self.stop_ambient_camera_rotation()self.stop_ambient_camera_rotation(about="phi")PolarPlane
classdepth 1manim.PolarPlane
class PolarPlane(MathObject)Polar coordinate plane with radial and angular labeling helpers.
Parameters
Maximum labeled radius value represented by the outer ring.
Rendered diameter of the plane in scene units.
Label style for angular coordinates, such as ``"PI radians"``.
Angular step between azimuth labels in radians.
Radial step between concentric coordinate labels.
Font size used for angular labels.
Optional style overrides for radial labels.
Optional style metadata for grid rendering.
Additional style or placement arguments.
Returns
A PolarPlane instance ready to add to a scene or combine with other mobjects.
Examples
plane = PolarPlane(radius_max=3, size=6, azimuth_step=PI / 6)Methods
5add
methoddef add(self, *objects)Add method.
Parameters
Objects accepted by add.
Returns
The updated PolarPlane after calling add.
Examples
obj.add(objects)add_coordinates
methoddef add_coordinates(self)Attach radial and azimuth coordinate labels to the polar plane.
Returns
The plane instance for chaining.
Examples
plane.add_coordinates()c2p
methoddef c2p(self, radius, azimuth)Alias for :meth:`coords_to_point` kept for coordinate-system compatibility.
Parameters
Radius accepted by c2p.
Azimuth accepted by c2p.
Returns
The updated PolarPlane after calling c2p.
Examples
obj.c2p(radius, azimuth)coords_to_point
methoddef coords_to_point(self, radius, azimuth)Convert polar coordinates into a scene-space point.
Parameters
Radial distance in plane coordinates.
Polar angle in radians.
Returns
A 3D scene point lying on the plane.
Examples
obj.coords_to_point(radius, azimuth)remove
methoddef remove(self, *objects)Remove method.
Parameters
Objects accepted by remove.
Returns
The updated PolarPlane after calling remove.
Examples
obj.remove(objects)VoiceoverScene
classdepth 1manim.VoiceoverScene
class VoiceoverScene(Scene)Scene subclass with reusable voiceover helpers for narrated 2D timelines.
Parameters
Scene accepted by VoiceoverScene.
Returns
A VoiceoverScene instance ready to add to a scene or combine with other mobjects.
Examples
class Demo(VoiceoverScene): def construct(self): self.add_voiceover("intro", "Narrated scene", 1.2) with self.play_voiceover_block("intro"): self.play(Write(Text("Narrated scene")))Methods
5add_voiceover
methoddef add_voiceover(self, voiceover_id, text, duration=None, title=None, mp3="", url="")Register a local voiceover entry with its narration text and duration.
Parameters
Unique identifier for this voiceover
The voiceover text/description
Optional duration hint in seconds
Returns
Updates the VoiceoverScene timeline or state after calling add_voiceover.
Examples
self.add_voiceover(voiceover_id, text)create_header
methoddef create_header(self, title_tex, subtitle_tex)Create a narrated-slide header with title and subtitle text.
Parameters
Main header text shown in the accent style.
Secondary line shown below the title.
Returns
A VGroup positioned near the top edge of the frame.
Examples
self.create_header(title_tex, subtitle_tex)export
methoddef export(self)Export scene data including voiceover information
Returns
Updates the VoiceoverScene timeline or state after calling export.
Examples
self.export()play_voiceover_block
methoddef play_voiceover_block(self, voiceover_id)Context manager for synchronizing animations with a voiceover entry.
Parameters
Voiceover id accepted by play_voiceover_block.
Returns
Updates the VoiceoverScene timeline or state after calling play_voiceover_block.
Examples
self.play_voiceover_block(voiceover_id)set_voiceovers
methoddef set_voiceovers(self, voiceover_map)Replace the current local voiceover map in one call.
Parameters
Dictionary mapping voiceover_id to {text, duration}
Returns
Updates the VoiceoverScene timeline or state after calling set_voiceovers.
Examples
self.set_voiceovers(voiceover_map)VMobject
classdepth 1manim.VMobject
class VMobject(MathObject)VMobject class.
Parameters
Math Object accepted by VMobject.
Returns
A VMobject instance ready to add to a scene or combine with other mobjects.
Examples
obj = VMobject()Methods
6add_line_to
methoddef add_line_to(self, point)Add line to method.
Parameters
Point accepted by add_line_to.
Returns
The updated VMobject after calling add_line_to.
Examples
obj.add_line_to(point)has_points
methoddef has_points(self)Has points method.
Returns
The updated VMobject after calling has_points.
Examples
obj.has_points()set_points
methoddef set_points(self, points)Set points method.
Parameters
Points accepted by set_points.
Returns
The updated VMobject after calling set_points.
Examples
obj.set_points(points)set_points_as_corners
methoddef set_points_as_corners(self, points)Set points as corners method.
Parameters
Points accepted by set_points_as_corners.
Returns
The updated VMobject after calling set_points_as_corners.
Examples
obj.set_points_as_corners(points)set_points_smoothly
methoddef set_points_smoothly(self, points)Set points smoothly method.
Parameters
Points accepted by set_points_smoothly.
Returns
The updated VMobject after calling set_points_smoothly.
Examples
obj.set_points_smoothly(points)start_new_path
methoddef start_new_path(self, point)Start new path method.
Parameters
Point accepted by start_new_path.
Returns
The updated VMobject after calling start_new_path.
Examples
obj.start_new_path(point)Group
classdepth 1manim.Group
class Group(MathObject)Container that groups child mobjects without changing their types.
Parameters
Math Object accepted by Group.
Returns
A Group instance ready to add to a scene or combine with other mobjects.
Examples
obj = Group()Methods
7add
methoddef add(self, *objects)Append one or more child mobjects to the group.
Parameters
Objects accepted by add.
Returns
The updated Group after calling add.
Examples
obj.add(objects)arrange
methoddef arrange(self, direction=RIGHT, buff=DEFAULT_MOBJECT_TO_MOBJECT_BUFFER, center=True, **kwargs)Lay out children sequentially along a direction with spacing.
Parameters
Direction accepted by arrange.
Buff accepted by arrange.
Center accepted by arrange.
Kwargs accepted by arrange.
Returns
The updated Group after calling arrange.
Examples
obj.arrange(direction, buff)arrange_in_grid
methoddef arrange_in_grid(self, rows=None, cols=None, buff=0.5, center=True, **kwargs)Arrange in grid method.
Parameters
Rows accepted by arrange_in_grid.
Cols accepted by arrange_in_grid.
Buff accepted by arrange_in_grid.
Center accepted by arrange_in_grid.
Kwargs accepted by arrange_in_grid.
Returns
The updated Group after calling arrange_in_grid.
Examples
obj.arrange_in_grid(rows, cols)get_center
methoddef get_center(self, query_time=None)Get center method.
Parameters
Query time accepted by get_center.
Returns
The updated Group after calling get_center.
Examples
obj.get_center(query_time)move_to
methoddef move_to(self, point_or_mobject, aligned_edge=None, **kwargs)Move the target so its center lands on the given point.
Parameters
Point or mobject accepted by move_to.
Aligned edge accepted by move_to.
Kwargs accepted by move_to.
Returns
The updated Group after calling move_to.
Examples
obj.move_to(point_or_mobject, aligned_edge)remove
methoddef remove(self, *objects)Remove one or more child mobjects from the group.
Parameters
Objects accepted by remove.
Returns
The updated Group after calling remove.
Examples
obj.remove(objects)shift
methoddef shift(self, vector)Translate the target by the provided vector.
Parameters
Vector accepted by shift.
Returns
The updated Group after calling shift.
Examples
obj.shift(vector)ZoomedScene
classdepth 1manim.ZoomedScene
class ZoomedScene(Scene)Scene variant that renders a second zoomed inset of the main camera.
Parameters
Scene accepted by ZoomedScene.
Returns
A ZoomedScene instance ready to add to a scene or combine with other mobjects.
Examples
class Demo(ZoomedScene): def construct(self): dot = Dot() self.add(dot) self.activate_zooming() self.play(self.get_zoomed_display_pop_out_animation())Methods
7activate_zooming
methoddef activate_zooming(self, animate=False)Enable the zoom frame and zoomed display overlay for the scene.
Parameters
When ``True``, also play the default zoom-in and pop-out animations immediately after activation.
Returns
The scene instance for chaining.
Examples
self.activate_zooming(animate)begin_ambient_camera_rotation
methoddef begin_ambient_camera_rotation(self, rate=0.02, about="theta")Start continuous ambient rotation on the zoomed scene camera.
Parameters
Angular speed in radians per second.
Camera angle to animate: ``"theta"``, ``"phi"``, or ``"gamma"``.
Returns
The scene instance for chaining.
Examples
self.begin_ambient_camera_rotation(rate, about)get_zoom_in_animation
methoddef get_zoom_in_animation(self, run_time=2, **kwargs)Return the animation that shrinks the zoom frame into place.
Parameters
Duration of the zoom-in transition.
Additional animation keyword arguments forwarded to ``ApplyMethod``.
Returns
An animation object that restores the zoom frame from a full-screen state to its configured size and position.
Examples
self.get_zoom_in_animation(run_time, kwargs)get_zoomed_display_pop_out_animation
methoddef get_zoomed_display_pop_out_animation(self)Return the inset pop-out animation for the zoomed display.
Returns
An animation group targeting the zoomed image and display frame, or a fallback display animation when child components are unavailable.
Examples
self.get_zoomed_display_pop_out_animation()move_camera
methoddef move_camera( self, phi=None, theta=None, gamma=None, zoom=None, focal_distance=None, distance=None, frame_center=None, run_time=1, rate_func=None, **kwargs )Animate the zoomed scene's shared camera frame as a 3D camera move.
Parameters
Target polar angle in radians.
Target azimuthal angle in radians.
Target roll angle.
Target zoom factor.
Target focal distance.
Target distance from the frame center.
Optional point to move the camera frame toward.
Animation duration in seconds.
Optional easing callback.
Additional compatibility aliases.
Returns
The scene instance for chaining.
Examples
self.move_camera(theta=-PI / 4, distance=6, run_time=1.2)self.move_camera(frame_center=ORIGIN, zoom=1.3, rate_func=smooth)set_camera_orientation
methoddef set_camera_orientation(self, phi=None, theta=None, gamma=None, zoom=None, focal_distance=None, distance=None, **kwargs)Enable 3D camera support and set the zoomed scene camera immediately.
Parameters
Polar angle in radians.
Azimuthal angle in radians.
Roll angle around the viewing axis.
Camera zoom factor.
Perspective focal distance.
Camera distance from the frame center.
Additional compatibility aliases.
Returns
The scene instance for chaining.
Examples
self.set_camera_orientation(phi, theta)stop_ambient_camera_rotation
methoddef stop_ambient_camera_rotation(self, about="theta")Stop ambient camera rotation previously started on the zoomed scene.
Parameters
Camera angle whose ambient updater should be removed.
Returns
The scene instance for chaining.
Examples
self.stop_ambient_camera_rotation(about)Code
classdepth 1manim.Code
class Code(MathObject)Shared-layout code block that preserves Manim-style constructor options.
Parameters
Math Object accepted by Code.
Returns
A Code instance ready to add to a scene or combine with other mobjects.
Examples
obj = Code()Methods
8align_to
methoddef align_to(self, mobject_or_point, direction)Align to method.
Parameters
Mobject or point accepted by align_to.
Direction accepted by align_to.
Returns
The updated Code after calling align_to.
Examples
obj.align_to(mobject_or_point, direction)center
methoddef center(self)Center method.
Returns
The updated Code after calling center.
Examples
obj.center()move_to
methoddef move_to(self, point_or_mobject, aligned_edge=None, **kwargs)Move the target so its center lands on the given point.
Parameters
Point or mobject accepted by move_to.
Aligned edge accepted by move_to.
Kwargs accepted by move_to.
Returns
The updated Code after calling move_to.
Examples
obj.move_to(point_or_mobject, aligned_edge)next_to
methoddef next_to(self, mobject_or_point, direction=RIGHT, buff=DEFAULT_MOBJECT_TO_MOBJECT_BUFFER, aligned_edge=ORIGIN)Next to method.
Parameters
Mobject or point accepted by next_to.
Direction accepted by next_to.
Buff accepted by next_to.
Aligned edge accepted by next_to.
Returns
The updated Code after calling next_to.
Examples
obj.next_to(mobject_or_point, direction)rotate
methoddef rotate(self, angle, axis=OUT, about_point=None)Rotate the target around a point or axis.
Parameters
Angle accepted by rotate.
Axis accepted by rotate.
About point accepted by rotate.
Returns
The updated Code after calling rotate.
Examples
obj.rotate(angle, axis)scale
methoddef scale(self, factor, about_point=None)Scale the target by a uniform or per-axis factor.
Parameters
Factor accepted by scale.
About point accepted by scale.
Returns
The updated Code after calling scale.
Examples
obj.scale(factor, about_point)shift
methoddef shift(self, vector)Translate the target by the provided vector.
Parameters
Vector accepted by shift.
Returns
The updated Code after calling shift.
Examples
obj.shift(vector)to_edge
methoddef to_edge(self, edge, buff=0.5)To edge method.
Parameters
Edge accepted by to_edge.
Buff accepted by to_edge.
Returns
The updated Code after calling to_edge.
Examples
obj.to_edge(edge, buff)Axes
classdepth 1manim.Axes
class Axes(MathObject)Coordinate axes with configurable ranges and visual lengths.
Parameters
``(min, max, step)`` tuple for the x-axis.
``(min, max, step)`` tuple for the y-axis.
Rendered x-axis length in scene units.
Rendered y-axis length in scene units.
Shared axis style configuration.
X-axis-specific style overrides.
Y-axis-specific style overrides.
Additional style or placement arguments.
Returns
A Axes instance ready to add to a scene or combine with other mobjects.
Examples
axes = Axes(x_range=[0, 4, 1], y_range=[0, 3, 1]).to_edge(DOWN, buff=0.6)Methods
11c2p
methoddef c2p(self, x, y)C2p method.
Parameters
X accepted by c2p.
Y accepted by c2p.
Returns
The updated Axes after calling c2p.
Examples
obj.c2p(x, y)coords_to_point
methoddef coords_to_point(self, *coords)Coords to point method.
Parameters
Coords accepted by coords_to_point.
Returns
The updated Axes after calling coords_to_point.
Examples
obj.coords_to_point(coords)get_axis_labels
methoddef get_axis_labels(self, x_label="x", y_label="y", **kwargs)Get axis labels method.
Parameters
X label accepted by get_axis_labels.
Y label accepted by get_axis_labels.
Kwargs accepted by get_axis_labels.
Returns
The updated Axes after calling get_axis_labels.
Examples
obj.get_axis_labels(x_label, y_label)get_horizontal_line
methoddef get_horizontal_line(self, point, line_func=None, color=None, stroke_width=2, **kwargs)Get horizontal line method.
Parameters
Point accepted by get_horizontal_line.
Line func accepted by get_horizontal_line.
Color accepted by get_horizontal_line.
Stroke width accepted by get_horizontal_line.
Kwargs accepted by get_horizontal_line.
Returns
The updated Axes after calling get_horizontal_line.
Examples
obj.get_horizontal_line(point, line_func)get_origin
methoddef get_origin(self)Get origin method.
Returns
The updated Axes after calling get_origin.
Examples
obj.get_origin()get_vertical_line
methoddef get_vertical_line(self, point, line_func=None, color=None, stroke_width=2, **kwargs)Get vertical line method.
Parameters
Point accepted by get_vertical_line.
Line func accepted by get_vertical_line.
Color accepted by get_vertical_line.
Stroke width accepted by get_vertical_line.
Kwargs accepted by get_vertical_line.
Returns
The updated Axes after calling get_vertical_line.
Examples
obj.get_vertical_line(point, line_func)get_x_axis_label
methoddef get_x_axis_label(self, label, edge=RIGHT, direction=DOWN, buff=0.25, **kwargs)Get x axis label method.
Parameters
Label accepted by get_x_axis_label.
Edge accepted by get_x_axis_label.
Direction accepted by get_x_axis_label.
Buff accepted by get_x_axis_label.
Kwargs accepted by get_x_axis_label.
Returns
The updated Axes after calling get_x_axis_label.
Examples
obj.get_x_axis_label(label, edge)get_y_axis_label
methoddef get_y_axis_label(self, label, edge=UP, direction=LEFT, buff=0.25, **kwargs)Get y axis label method.
Parameters
Label accepted by get_y_axis_label.
Edge accepted by get_y_axis_label.
Direction accepted by get_y_axis_label.
Buff accepted by get_y_axis_label.
Kwargs accepted by get_y_axis_label.
Returns
The updated Axes after calling get_y_axis_label.
Examples
obj.get_y_axis_label(label, edge)move_to
methoddef move_to(self, point_or_mobject, **kwargs)Move the target so its center lands on the given point.
Parameters
Point or mobject accepted by move_to.
Kwargs accepted by move_to.
Returns
The updated Axes after calling move_to.
Examples
obj.move_to(point_or_mobject, kwargs)plot
methoddef plot(self, func, x_range=None, color=None, stroke_width=3, **kwargs)Plot method.
Parameters
Func accepted by plot.
X range accepted by plot.
Color accepted by plot.
Stroke width accepted by plot.
Kwargs accepted by plot.
Returns
The updated Axes after calling plot.
Examples
obj.plot(func, x_range)shift
methoddef shift(self, vector)Translate the target by the provided vector.
Parameters
Vector accepted by shift.
Returns
The updated Axes after calling shift.
Examples
obj.shift(vector)Angle
classdepth 2manim.Angle
class Angle(Arc)Angle class.
Parameters
Arc accepted by Angle.
Returns
A Angle instance ready to add to a scene or combine with other mobjects.
Examples
obj = Angle()AnnularSector
classdepth 2manim.AnnularSector
class AnnularSector(Polygon)Annular Sector class.
Parameters
Polygon accepted by AnnularSector.
Returns
A AnnularSector instance ready to add to a scene or combine with other mobjects.
Examples
obj = AnnularSector()ArcBetweenPoints
classdepth 2manim.ArcBetweenPoints
class ArcBetweenPoints(Arc)Circular arc spanning two points using Manim's constructor rules.
Parameters
Arc accepted by ArcBetweenPoints.
Returns
A ArcBetweenPoints instance ready to add to a scene or combine with other mobjects.
Examples
obj = ArcBetweenPoints()ArcPolygon
classdepth 2manim.ArcPolygon
class ArcPolygon(Polygon)Arc Polygon class.
Parameters
Polygon accepted by ArcPolygon.
Returns
A ArcPolygon instance ready to add to a scene or combine with other mobjects.
Examples
obj = ArcPolygon()ArrowCircleFilledTip
classdepth 2manim.ArrowCircleFilledTip
class ArrowCircleFilledTip(Circle)Arrow Circle Filled Tip class.
Parameters
Circle accepted by ArrowCircleFilledTip.
Returns
A ArrowCircleFilledTip instance ready to add to a scene or combine with other mobjects.
Examples
obj = ArrowCircleFilledTip()ArrowCircleTip
classdepth 2manim.ArrowCircleTip
class ArrowCircleTip(Circle)Arrow Circle Tip class.
Parameters
Circle accepted by ArrowCircleTip.
Returns
A ArrowCircleTip instance ready to add to a scene or combine with other mobjects.
Examples
obj = ArrowCircleTip()ArrowSquareFilledTip
classdepth 2manim.ArrowSquareFilledTip
class ArrowSquareFilledTip(Square)Arrow Square Filled Tip class.
Parameters
Square accepted by ArrowSquareFilledTip.
Returns
A ArrowSquareFilledTip instance ready to add to a scene or combine with other mobjects.
Examples
obj = ArrowSquareFilledTip()ArrowSquareTip
classdepth 2manim.ArrowSquareTip
class ArrowSquareTip(Square)Arrow Square Tip class.
Parameters
Square accepted by ArrowSquareTip.
Returns
A ArrowSquareTip instance ready to add to a scene or combine with other mobjects.
Examples
obj = ArrowSquareTip()ArrowTriangleFilledTip
classdepth 2manim.ArrowTriangleFilledTip
class ArrowTriangleFilledTip(Polygon)Filled triangular arrow tip sized with Manim-like defaults.
Parameters
Polygon accepted by ArrowTriangleFilledTip.
Returns
A ArrowTriangleFilledTip instance ready to add to a scene or combine with other mobjects.
Examples
obj = ArrowTriangleFilledTip()BraceBetweenPoints
classdepth 2manim.BraceBetweenPoints
class BraceBetweenPoints(Brace)Brace Between Points class.
Parameters
Brace accepted by BraceBetweenPoints.
Returns
A BraceBetweenPoints instance ready to add to a scene or combine with other mobjects.
Examples
obj = BraceBetweenPoints()ConvexHull
classdepth 2manim.ConvexHull
class ConvexHull(Polygon)Convex Hull class.
Parameters
Polygon accepted by ConvexHull.
Returns
A ConvexHull instance ready to add to a scene or combine with other mobjects.
Examples
obj = ConvexHull()DashedLine
classdepth 2manim.DashedLine
class DashedLine(Line)Dashed Line class.
Parameters
Line accepted by DashedLine.
Returns
A DashedLine instance ready to add to a scene or combine with other mobjects.
Examples
obj = DashedLine()Dot
classdepth 2manim.Dot
class Dot(Circle)Filled circular point marker.
Parameters
Circle accepted by Dot.
Returns
A Dot instance ready to add to a scene or combine with other mobjects.
Examples
obj = Dot()DoubleArrow
classdepth 2manim.DoubleArrow
class DoubleArrow(Arrow)Line segment with arrow tips at both the start and end points.
Parameters
Start point of the arrow shaft.
End point of the arrow shaft.
Additional style or placement arguments.
Returns
A DoubleArrow instance ready to add to a scene or combine with other mobjects.
Examples
connector = DoubleArrow(LEFT, RIGHT, color=YELLOW)Elbow
classdepth 2manim.Elbow
class Elbow(Polygon)Elbow class.
Parameters
Polygon accepted by Elbow.
Returns
A Elbow instance ready to add to a scene or combine with other mobjects.
Examples
obj = Elbow()Ellipse
classdepth 2manim.Ellipse
class Ellipse(Circle)Ellipse class.
Parameters
Circle accepted by Ellipse.
Returns
A Ellipse instance ready to add to a scene or combine with other mobjects.
Examples
obj = Ellipse()MarkupText
classdepth 2manim.MarkupText
class MarkupText(Text)Text that accepts simple inline markup tags and strips them for rendering.
Parameters
Text accepted by MarkupText.
Returns
A MarkupText instance ready to add to a scene or combine with other mobjects.
Examples
obj = MarkupText()MathTex
classdepth 2manim.MathTex
class MathTex(Tex)Math-oriented ``Tex`` variant that accepts multiple fragments.
Parameters
One or more TeX fragments.
Text size in pixels.
Snake-case alias for ``fontSize``.
Separator inserted between fragments.
Additional style or placement arguments.
Returns
A MathTex instance ready to add to a scene or combine with other mobjects.
Examples
eq = MathTex(r"e^{i\\pi} + 1 = 0")Polygram
classdepth 2manim.Polygram
class Polygram(Polygon)Polygram class.
Parameters
Polygon accepted by Polygram.
Returns
A Polygram instance ready to add to a scene or combine with other mobjects.
Examples
obj = Polygram()RegularPolygram
classdepth 2manim.RegularPolygram
class RegularPolygram(Polygon)Regular Polygram class.
Parameters
Polygon accepted by RegularPolygram.
Returns
A RegularPolygram instance ready to add to a scene or combine with other mobjects.
Examples
obj = RegularPolygram()RightAngle
classdepth 2manim.RightAngle
class RightAngle(Polygon)Right Angle class.
Parameters
Polygon accepted by RightAngle.
Returns
A RightAngle instance ready to add to a scene or combine with other mobjects.
Examples
obj = RightAngle()RoundedRectangle
classdepth 2manim.RoundedRectangle
class RoundedRectangle(Rectangle)Rectangle variant with rounded corners.
Parameters
Rectangle accepted by RoundedRectangle.
Returns
A RoundedRectangle instance ready to add to a scene or combine with other mobjects.
Examples
obj = RoundedRectangle()Sector
classdepth 2manim.Sector
class Sector(Polygon)Sector class.
Parameters
Polygon accepted by Sector.
Returns
A Sector instance ready to add to a scene or combine with other mobjects.
Examples
obj = Sector()Star
classdepth 2manim.Star
class Star(Polygon)Star class.
Parameters
Polygon accepted by Star.
Returns
A Star instance ready to add to a scene or combine with other mobjects.
Examples
obj = Star()SurroundingRectangle
classdepth 2manim.SurroundingRectangle
class SurroundingRectangle(Rectangle)Rectangle that surrounds a mobject - exports as 'Rectangle' type
Parameters
Rectangle accepted by SurroundingRectangle.
Returns
A SurroundingRectangle instance ready to add to a scene or combine with other mobjects.
Examples
obj = SurroundingRectangle()SVGMobject
classdepth 2manim.SVGMobject
class SVGMobject(ImageMobject)SVG-backed image mobject.
Parameters
Image Mobject accepted by SVGMobject.
Returns
A SVGMobject instance ready to add to a scene or combine with other mobjects.
Examples
obj = SVGMobject()TangentLine
classdepth 2manim.TangentLine
class TangentLine(Line)Tangent Line class.
Parameters
Line accepted by TangentLine.
Returns
A TangentLine instance ready to add to a scene or combine with other mobjects.
Examples
obj = TangentLine()Underline
classdepth 2manim.Underline
class Underline(Line)Underline class.
Parameters
Line accepted by Underline.
Returns
A Underline instance ready to add to a scene or combine with other mobjects.
Examples
obj = Underline()Vector
classdepth 2manim.Vector
class Vector(Arrow)Vector class.
Parameters
Arrow accepted by Vector.
Returns
A Vector instance ready to add to a scene or combine with other mobjects.
Examples
obj = Vector()Vector3D
classdepth 2manim.Vector3D
class Vector3D(Arrow3D)Arrow that starts at the origin and points along a direction vector.
Parameters
3D direction vector used as the arrow end point.
Additional style or placement arguments.
Returns
A Vector3D instance ready to add to a scene or combine with other mobjects.
Examples
velocity = Vector3D([0.9, 0.7, 1.1], color=RED)VGroup
classdepth 2manim.VGroup
class VGroup(Group)Group variant used for vectorized collections of mobjects.
Parameters
Group accepted by VGroup.
Returns
A VGroup instance ready to add to a scene or combine with other mobjects.
Examples
obj = VGroup()Integer
classdepth 2manim.Integer
class Integer(DecimalNumber)Integer-valued number mobject with animate/set_value support.
Parameters
Decimal Number accepted by Integer.
Returns
A Integer instance ready to add to a scene or combine with other mobjects.
Examples
obj = Integer()Methods
1set_value
methoddef set_value(self, value)Set value on the tracked scalar value.
Parameters
Value accepted by set_value.
Returns
The updated Integer after calling set_value.
Examples
obj.set_value(value)TracedPath
classdepth 2manim.TracedPath
class TracedPath(VMobject)Continuously trace points returned by a callback over time.
Parameters
VMobject accepted by TracedPath.
Returns
A TracedPath instance ready to add to a scene or combine with other mobjects.
Examples
obj = TracedPath()Methods
1update_path
methoddef update_path(self, mob, dt)Update path method.
Parameters
Mob accepted by update_path.
Dt accepted by update_path.
Returns
The updated TracedPath after calling update_path.
Examples
obj.update_path(mob, dt)VoiceoverThreeDScene
classdepth 2manim.VoiceoverThreeDScene
class VoiceoverThreeDScene(ThreeDScene)ThreeDScene variant with the same reusable voiceover helpers as VoiceoverScene.
Parameters
Three DScene accepted by VoiceoverThreeDScene.
Returns
A VoiceoverThreeDScene instance ready to add to a scene or combine with other mobjects.
Examples
class Demo(VoiceoverThreeDScene): def construct(self): self.add_voiceover("intro", "Narrated 3D scene", 1.4) self.set_camera_orientation(phi=70 * DEGREES, theta=-45 * DEGREES) cube = Cube().set_color(BLUE) self.add(cube) with self.play_voiceover_block("intro"): self.begin_ambient_camera_rotation(rate=0.15) self.wait(1.4) self.stop_ambient_camera_rotation()Methods
5add_voiceover
methoddef add_voiceover(self, voiceover_id, text, duration, title=None, mp3="", url="")Register a local voiceover entry with its narration text and duration.
Parameters
Unique identifier for this voiceover
The voiceover text/description
Duration in seconds
Returns
Updates the VoiceoverThreeDScene timeline or state after calling add_voiceover.
Examples
self.add_voiceover(voiceover_id, text)create_header
methoddef create_header(self, title_tex, subtitle_tex)Create a narrated-slide header with title and subtitle text.
Parameters
Main header text shown in the accent style.
Secondary line shown below the title.
Returns
A VGroup positioned near the top edge of the frame.
Examples
self.create_header(title_tex, subtitle_tex)export
methoddef export(self)Export 3D scene data including voiceover information
Returns
Updates the VoiceoverThreeDScene timeline or state after calling export.
Examples
self.export()play_voiceover_block
methoddef play_voiceover_block(self, voiceover_id)Context manager for synchronizing 3D animations with a voiceover entry.
Parameters
Voiceover id accepted by play_voiceover_block.
Returns
Updates the VoiceoverThreeDScene timeline or state after calling play_voiceover_block.
Examples
self.play_voiceover_block(voiceover_id)set_voiceovers
methoddef set_voiceovers(self, voiceover_map)Replace the current local voiceover map in one call.
Parameters
Dictionary mapping voiceover_id to {text, duration}
Returns
Updates the VoiceoverThreeDScene timeline or state after calling set_voiceovers.
Examples
self.set_voiceovers(voiceover_map)NumberPlane
classdepth 2manim.NumberPlane
class NumberPlane(Axes)Cartesian grid plane with vector and coordinate-label helpers.
Parameters
``(min, max, step)`` tuple for the x-axis.
``(min, max, step)`` tuple for the y-axis.
Rendered x-axis length in scene units.
Rendered y-axis length in scene units.
Shared axis style configuration.
X-axis-specific style overrides.
Y-axis-specific style overrides.
Style metadata for primary grid lines.
Style metadata for secondary grid lines.
Density ratio for faded grid lines.
Compatibility flag stored in exported metadata.
Additional style or placement arguments.
Returns
A NumberPlane instance ready to add to a scene or combine with other mobjects.
Examples
plane = NumberPlane(x_range=[-4, 4, 1], y_range=[-3, 3, 1])Methods
9add
methoddef add(self, *objects)Add method.
Parameters
Objects accepted by add.
Returns
The updated NumberPlane after calling add.
Examples
obj.add(objects)add_coordinates
methoddef add_coordinates(self, x_values=None, y_values=None, **kwargs)Attach numeric coordinate labels to the x and y axes.
Parameters
Optional explicit x-axis values.
Optional explicit y-axis values.
Label styling such as ``font_size`` and ``color``.
Returns
The plane instance for chaining.
Examples
obj.add_coordinates(x_values, y_values)get_axis_labels
methoddef get_axis_labels(self, x_label="x", y_label="y", **kwargs)Return a ``VGroup`` containing x and y axis labels.
Parameters
X label accepted by get_axis_labels.
Y label accepted by get_axis_labels.
Kwargs accepted by get_axis_labels.
Returns
The updated NumberPlane after calling get_axis_labels.
Examples
obj.get_axis_labels(x_label, y_label)get_coordinate_labels
methoddef get_coordinate_labels(self, x_values=None, y_values=None, **kwargs)Return numeric coordinate labels for the visible x and y axes.
Parameters
Optional explicit x-axis values.
Optional explicit y-axis values.
Label styling such as ``font_size`` and ``color``.
Returns
A ``VGroup`` of label mobjects. Notes: The origin label ``0`` is omitted to avoid duplicate labels where the axes intersect.
Examples
obj.get_coordinate_labels(x_values, y_values)get_vector
methoddef get_vector(self, coords, **kwargs)Return an arrow from the plane origin to a coordinate on the plane.
Parameters
Target coordinate pair.
Additional ``Arrow`` styling arguments.
Returns
An ``Arrow`` whose endpoints are resolved through the plane mapping.
Examples
obj.get_vector(coords, kwargs)get_x_axis_label
methoddef get_x_axis_label(self, label, edge=RIGHT, direction=DOWN, buff=0.25, **kwargs)Build a label mobject near the positive end of the x-axis.
Parameters
Label accepted by get_x_axis_label.
Edge accepted by get_x_axis_label.
Direction accepted by get_x_axis_label.
Buff accepted by get_x_axis_label.
Kwargs accepted by get_x_axis_label.
Returns
The updated NumberPlane after calling get_x_axis_label.
Examples
obj.get_x_axis_label(label, edge)get_y_axis_label
methoddef get_y_axis_label(self, label, edge=UP, direction=LEFT, buff=0.25, **kwargs)Build a label mobject near the positive end of the y-axis.
Parameters
Label accepted by get_y_axis_label.
Edge accepted by get_y_axis_label.
Direction accepted by get_y_axis_label.
Buff accepted by get_y_axis_label.
Kwargs accepted by get_y_axis_label.
Returns
The updated NumberPlane after calling get_y_axis_label.
Examples
obj.get_y_axis_label(label, edge)prepare_for_nonlinear_transform
methoddef prepare_for_nonlinear_transform(self, num_inserted_curves=50)Mark the plane as prepared for nonlinear transforms.
Parameters
Metadata hint describing the requested curve density.
Returns
The plane instance for chaining.
Examples
obj.prepare_for_nonlinear_transform(num_inserted_curves)remove
methoddef remove(self, *objects)Remove method.
Parameters
Objects accepted by remove.
Returns
The updated NumberPlane after calling remove.
Examples
obj.remove(objects)AnnotationDot
classdepth 3manim.AnnotationDot
class AnnotationDot(Dot)Annotation Dot class.
Parameters
Dot accepted by AnnotationDot.
Returns
A AnnotationDot instance ready to add to a scene or combine with other mobjects.
Examples
obj = AnnotationDot()Annulus
classdepth 3manim.Annulus
class Annulus(AnnularSector)Annulus class.
Parameters
Annular Sector accepted by Annulus.
Returns
A Annulus instance ready to add to a scene or combine with other mobjects.
Examples
obj = Annulus()ArcBrace
classdepth 3manim.ArcBrace
class ArcBrace(BraceBetweenPoints)Arc Brace class.
Parameters
Brace Between Points accepted by ArcBrace.
Returns
A ArcBrace instance ready to add to a scene or combine with other mobjects.
Examples
obj = ArcBrace()ArcPolygonFromArcs
classdepth 3manim.ArcPolygonFromArcs
class ArcPolygonFromArcs(ArcPolygon)Arc Polygon From Arcs class.
Parameters
Arc Polygon accepted by ArcPolygonFromArcs.
Returns
A ArcPolygonFromArcs instance ready to add to a scene or combine with other mobjects.
Examples
obj = ArcPolygonFromArcs()ArrowTip
classdepth 3manim.ArrowTip
class ArrowTip(ArrowTriangleFilledTip)Arrow Tip class.
Parameters
Arrow Triangle Filled Tip accepted by ArrowTip.
Returns
A ArrowTip instance ready to add to a scene or combine with other mobjects.
Examples
obj = ArrowTip()ArrowTriangleTip
classdepth 3manim.ArrowTriangleTip
class ArrowTriangleTip(ArrowTriangleFilledTip)Arrow Triangle Tip class.
Parameters
Arrow Triangle Filled Tip accepted by ArrowTriangleTip.
Returns
A ArrowTriangleTip instance ready to add to a scene or combine with other mobjects.
Examples
obj = ArrowTriangleTip()BackgroundRectangle
classdepth 3manim.BackgroundRectangle
class BackgroundRectangle(SurroundingRectangle)Filled rectangle sized to sit behind another mobject.
Parameters
Surrounding Rectangle accepted by BackgroundRectangle.
Returns
A BackgroundRectangle instance ready to add to a scene or combine with other mobjects.
Examples
obj = BackgroundRectangle()BraceLabel
classdepth 3manim.BraceLabel
class BraceLabel(VGroup)Brace Label class.
Parameters
VGroup accepted by BraceLabel.
Returns
A BraceLabel instance ready to add to a scene or combine with other mobjects.
Examples
obj = BraceLabel()Cross
classdepth 3manim.Cross
class Cross(VGroup)Simple diagonal cross mark used for highlights and failure indicators.
Parameters
VGroup accepted by Cross.
Returns
A Cross instance ready to add to a scene or combine with other mobjects.
Examples
obj = Cross()CurvedArrow
classdepth 3manim.CurvedArrow
class CurvedArrow(ArcBetweenPoints)Curved Arrow class.
Parameters
Arc Between Points accepted by CurvedArrow.
Returns
A CurvedArrow instance ready to add to a scene or combine with other mobjects.
Examples
obj = CurvedArrow()Cutout
classdepth 3manim.Cutout
class Cutout(VGroup)Cutout class.
Parameters
VGroup accepted by Cutout.
Returns
A Cutout instance ready to add to a scene or combine with other mobjects.
Examples
obj = Cutout()Difference
classdepth 3manim.Difference
class Difference(VGroup)Difference class.
Parameters
VGroup accepted by Difference.
Returns
A Difference instance ready to add to a scene or combine with other mobjects.
Examples
obj = Difference()Exclusion
classdepth 3manim.Exclusion
class Exclusion(VGroup)Exclusion class.
Parameters
VGroup accepted by Exclusion.
Returns
A Exclusion instance ready to add to a scene or combine with other mobjects.
Examples
obj = Exclusion()Intersection
classdepth 3manim.Intersection
class Intersection(VGroup)Intersection class.
Parameters
VGroup accepted by Intersection.
Returns
A Intersection instance ready to add to a scene or combine with other mobjects.
Examples
obj = Intersection()LabeledDot
classdepth 3manim.LabeledDot
class LabeledDot(VGroup)Labeled Dot class.
Parameters
VGroup accepted by LabeledDot.
Returns
A LabeledDot instance ready to add to a scene or combine with other mobjects.
Examples
obj = LabeledDot()Matrix
classdepth 3manim.Matrix
class Matrix(VGroup)Minimal matrix helper that arranges entries in rows with brackets.
Parameters
VGroup accepted by Matrix.
Returns
A Matrix instance ready to add to a scene or combine with other mobjects.
Examples
obj = Matrix()Paragraph
classdepth 3manim.Paragraph
class Paragraph(VGroup)Vertical stack of text lines with alignment controls.
Parameters
VGroup accepted by Paragraph.
Returns
A Paragraph instance ready to add to a scene or combine with other mobjects.
Examples
obj = Paragraph()StealthTip
classdepth 3manim.StealthTip
class StealthTip(ArrowTriangleFilledTip)Stealth Tip class.
Parameters
Arrow Triangle Filled Tip accepted by StealthTip.
Returns
A StealthTip instance ready to add to a scene or combine with other mobjects.
Examples
obj = StealthTip()TangentialArc
classdepth 3manim.TangentialArc
class TangentialArc(ArcBetweenPoints)Tangential Arc class.
Parameters
Arc Between Points accepted by TangentialArc.
Returns
A TangentialArc instance ready to add to a scene or combine with other mobjects.
Examples
obj = TangentialArc()Title
classdepth 3manim.Title
class Title(VGroup)Minimal title helper aligned to the top edge like Manim's Title.
Parameters
VGroup accepted by Title.
Returns
A Title instance ready to add to a scene or combine with other mobjects.
Examples
obj = Title()Union
classdepth 3manim.Union
class Union(VGroup)Union class.
Parameters
VGroup accepted by Union.
Returns
A Union instance ready to add to a scene or combine with other mobjects.
Examples
obj = Union()Table
classdepth 3manim.Table
class Table(VGroup)Simple table made of rectangle/text cells with ``get_rows()`` compatibility.
Parameters
VGroup accepted by Table.
Returns
A Table instance ready to add to a scene or combine with other mobjects.
Examples
obj = Table()Methods
1get_rows
methoddef get_rows(self)Get rows method.
Returns
The updated Table after calling get_rows.
Examples
obj.get_rows()BulletedList
classdepth 3manim.BulletedList
class BulletedList(VGroup)Vertical stack of TeX items with bullet dots, mirroring Manim's helper.
Parameters
VGroup accepted by BulletedList.
Returns
A BulletedList instance ready to add to a scene or combine with other mobjects.
Examples
obj = BulletedList()Methods
4fade_all_but
methoddef fade_all_but(self, tex, opacity=0.5, substring=True)Fade all but method.
Parameters
Tex accepted by fade_all_but.
Opacity accepted by fade_all_but.
Substring accepted by fade_all_but.
Returns
The updated BulletedList after calling fade_all_but.
Examples
obj.fade_all_but(tex, opacity)get_part_by_tex
methoddef get_part_by_tex(self, tex, substring=True)Get part by tex method.
Parameters
Tex accepted by get_part_by_tex.
Substring accepted by get_part_by_tex.
Returns
The updated BulletedList after calling get_part_by_tex.
Examples
obj.get_part_by_tex(tex, substring)get_parts_by_tex
methoddef get_parts_by_tex(self, tex, substring=True)Get parts by tex method.
Parameters
Tex accepted by get_parts_by_tex.
Substring accepted by get_parts_by_tex.
Returns
The updated BulletedList after calling get_parts_by_tex.
Examples
obj.get_parts_by_tex(tex, substring)set_color_by_tex
methoddef set_color_by_tex(self, tex, color, substring=True)Set color by tex method.
Parameters
Tex accepted by set_color_by_tex.
Color accepted by set_color_by_tex.
Substring accepted by set_color_by_tex.
Returns
The updated BulletedList after calling set_color_by_tex.
Examples
obj.set_color_by_tex(tex, color)BraceText
classdepth 4manim.BraceText
class BraceText(BraceLabel)Brace Text class.
Parameters
Brace Label accepted by BraceText.
Returns
A BraceText instance ready to add to a scene or combine with other mobjects.
Examples
obj = BraceText()CurvedDoubleArrow
classdepth 4manim.CurvedDoubleArrow
class CurvedDoubleArrow(CurvedArrow)Curved Double Arrow class.
Parameters
Curved Arrow accepted by CurvedDoubleArrow.
Returns
A CurvedDoubleArrow instance ready to add to a scene or combine with other mobjects.
Examples
obj = CurvedDoubleArrow()numpy
Minimal NumPy-compatible helpers exposed as the ``numpy`` shim.
Constants
11abs
constantnumpy.abs
abs_valueAbs constant.
Examples
value = absarctan
constantnumpy.arctan
arctan_valueArctan constant.
Examples
value = arctanarctan2
constantnumpy.arctan2
arctan2_valueArctan2 constant.
Examples
value = arctan2cos
constantnumpy.cos
cos_valueCos constant.
Examples
value = cose
constantnumpy.e
2.718281828459045Base of the natural logarithm.
Examples
value = elinalg
constantnumpy.linalg
_NPLinalgModule()Linalg constant.
Examples
value = linalgpi
constantnumpy.pi
3.141592653589793Ratio of a circle's circumference to its diameter.
Examples
value = pisin
constantnumpy.sin
sin_valueSin constant.
Examples
value = sinsqrt
constantnumpy.sqrt
sqrt_valueSqrt constant.
Examples
value = sqrttan
constantnumpy.tan
tan_valueTan constant.
Examples
value = tantau
constantnumpy.tau
6.283185307179586Full turn constant, equal to ``2 * pi``.
Examples
value = tauFunctions
16abs_value
functionnumpy.abs_value
def abs_value(value)Abs value function.
Parameters
Value accepted by abs_value.
Returns
A numpy-compatible value produced by abs_value.
Examples
result = np.abs_value(value)arange
functionnumpy.arange
def arange(start, stop=None, step=1)Return evenly spaced values in the half-open interval ``[start, stop)``.
Parameters
First value, or the exclusive stop value if ``stop`` is omitted.
Exclusive upper bound.
Signed increment between values.
Returns
A list of scalar samples.
Examples
ticks = np.arange(0, 1.1, 0.1)arctan_value
functionnumpy.arctan_value
def arctan_value(value)Arctan value function.
Parameters
Value accepted by arctan_value.
Returns
A numpy-compatible value produced by arctan_value.
Examples
result = np.arctan_value(value)arctan2_value
functionnumpy.arctan2_value
def arctan2_value(y, x)Arctan2 value function.
Parameters
Y accepted by arctan2_value.
X accepted by arctan2_value.
Returns
A numpy-compatible value produced by arctan2_value.
Examples
result = np.arctan2_value(y, x)around
functionnumpy.around
def around(value, decimals=0)Around function.
Parameters
Value accepted by around.
Decimals accepted by around.
Returns
A numpy-compatible value produced by around.
Examples
result = np.around(value, decimals)array
functionnumpy.array
def array(value, dtype=None)Convert a value or nested sequence into a list-backed array shim.
Parameters
Scalar or nested sequence to normalize.
Accepted for compatibility and currently ignored.
Returns
A list-backed array representation understood by the runtime.
Examples
pts = np.array([[0, 0, 0], [1, 1, 0]])clip
functionnumpy.clip
def clip(value, min_value, max_value)Clamp scalars or nested lists into the provided numeric range.
Parameters
Scalar or nested list to clamp.
Inclusive lower bound.
Inclusive upper bound.
Returns
A clamped value with the same basic shape as the input.
Examples
volume = np.clip(volume, 0, 1)cos_value
functionnumpy.cos_value
def cos_value(value)Cos value function.
Parameters
Value accepted by cos_value.
Returns
A numpy-compatible value produced by cos_value.
Examples
result = np.cos_value(value)exp
functionnumpy.exp
def exp(value)Exp function.
Parameters
Value accepted by exp.
Returns
A numpy-compatible value produced by exp.
Examples
result = np.exp(value)linspace
functionnumpy.linspace
def linspace(start, stop, num=50)Return evenly spaced scalar samples between ``start`` and ``stop``.
Parameters
First sample value.
Last sample value.
Number of requested samples.
Returns
A list of evenly spaced numeric samples.
Examples
ticks = np.linspace(0, TAU, 8)roll
functionnumpy.roll
def roll(arr, shift, axis=0)Roll a 1D list-like sequence by ``shift`` positions.
Parameters
Sequence to rotate.
Signed roll amount.
Accepted for compatibility and currently ignored.
Returns
A sequence with elements rotated by the requested shift.
Examples
rotated = np.roll([1, 2, 3, 4], 1)round
functionnumpy.round
def round(value, decimals=0)Round scalars or nested sequences to a fixed precision.
Parameters
Scalar or nested sequence to round.
Number of decimal places to preserve.
Returns
A rounded scalar or array-like wrapper.
Examples
points = np.round(np.linspace(0, 1, 5), 2)sin_value
functionnumpy.sin_value
def sin_value(value)Sin value function.
Parameters
Value accepted by sin_value.
Returns
A numpy-compatible value produced by sin_value.
Examples
result = np.sin_value(value)sqrt_value
functionnumpy.sqrt_value
def sqrt_value(value)Sqrt value function.
Parameters
Value accepted by sqrt_value.
Returns
A numpy-compatible value produced by sqrt_value.
Examples
result = np.sqrt_value(value)tan_value
functionnumpy.tan_value
def tan_value(value)Tan value function.
Parameters
Value accepted by tan_value.
Returns
A numpy-compatible value produced by tan_value.
Examples
result = np.tan_value(value)uint8
functionnumpy.uint8
def uint8(value)Uint8 function.
Parameters
Value accepted by uint8.
Returns
A numpy-compatible value produced by uint8.
Examples
result = np.uint8(value)