Start a project session and make it the current one (later calls without
project_id target it). quality: low (480p) | medium (720p) | high (1080p).
fps: frame rate, default 15/30/60 for low/medium/high. theme: chalkboard|whiteboard|dark.
输入参数fpsthemequality
Current project state: scenes, objects, steps, parameters and open obligations.
输入参数project_id
Release a project session (default: the current one). If others are open, the
most recently opened becomes current; the result names it.
输入参数project_id
Append a scene to the project; it becomes the default target of later calls
without scene_id. The title is a label for you (it is not drawn: use add_text).
输入参数titleproject_id
Declare a continuous scene parameter (e.g. time t). Use it by name in plot
expressions or shape anchors (expr='sin(x - t)'), then animate it smoothly with
add_step(kind='tween', param=name, value=...). Curves, areas and anchored shapes
that use it are redrawn every frame.
输入参数name必填valuescene_idproject_id
Add a LaTeX equation (math mode, e.g. tex=r'e^{i\pi}+1=0'). Dirac notation
(\ket{n}, \bra{n}, \braket{a}{b}, \expval{A}) and physics macros work.
输入参数xytex必填colorscalescene_idproject_id
Add axes with functions of x. Each function: {'expr': 'sin(x)', 'color': 'YELLOW'}.
Expressions use x, bare math functions (sin, exp, sqrt, sign, ...), np.<fn>, and
declared scene parameters; they are validated now. Sampling is adaptive (dense,
no spline overshoot on jumps, curves split at poles and clipped to the axes);
optional overrides: 'smooth': bool, 'dx': step. x_label/y_label are LaTeX.
Defaults: x_range [-5, 5, 1], y_range [-3, 3, 1]; a [min, max] range gets a
readable tick step (4-8 ticks, starting at min, or at 0 if 0 is inside the range);
the result echoes the ranges used. Curves
without a color get distinct colors suited to the theme. The axes are centred at
(x, y); labels hang off them. Without functions you get bare axes.
输入参数xywidthheightx_labelx_rangey_labely_rangescene_idfunctionsproject_idshow_numbers
Add a title/label/callout (plain text, any language). The rendered size is
font_size x scale.
输入参数xytext必填colorscalescene_idfont_sizeproject_id
Add primitive geometry: circle|square|rectangle|triangle|arrow|dot|line, centred
at (x, y) (default 0, 0). size (default 1): circle = diameter, square = side,
triangle = circumradius, dot = 10 x radius (minimum radius 0.05), line/arrow =
length (horizontal).
rectangle: width x height (default 1 x 0.5) instead of size.
line/arrow: give x1,y1,x2,y2 for an explicit segment (any direction) instead of
size/x/y. Anchor in a plot's coordinates with plot_id + at_x + at_y expressions
instead of x/y (they may use scene parameters, so a dot can track <x>(t) while a
tween runs). Arguments that do not apply to the chosen shape are rejected.
输入参数xyx1x2y1y2at_xat_ysizecolorshapewidth另有 4 个
Shade the area between a plotted function and the x-axis on [x_min, x_max] (the
integral). [x_min, x_max] must lie within the plot's x_range, y = 0 must be on the
axes, and the function must be defined and inside y_range there (otherwise an
error says what to widen). It follows its plot (move the plot, not it).
输入参数colorx_maxx_minopacityplot_id必填scene_idproject_idfunction_index
Riemann rectangles (left endpoints, fill opacity 0.6, one color) under a plotted
function on [x_min, x_max] within the plot's x_range; (x_max - x_min)/dx must be a
whole number, y = 0 must be on the axes and the function inside y_range there.
Smaller dx = finer; transform coarse->fine to show convergence. They follow
their plot.
输入参数dxcolorx_maxx_minplot_id必填scene_idproject_idfunction_index
Append a timed beat. kind: write|transform|highlight|fade|camera_move|wait|tween.
write/highlight/fade: all targets animate together, over `duration` (a plot's axes
and curves are drawn together; highlight is a brief 1.2x pulse in the theme's
accent color). An object driven by a parameter cannot be written, highlighted
or faded in the same beat as a tween of that parameter (Manim freezes it).
transform: one target morphs into `to` (the target keeps its id afterwards).
camera_move: zoom is absolute (1 = the full frame, 2 = twice as close); focus_x/
focus_y recentre the camera, omitted = keep the current centre.
tween: animate scene parameter `param` to `value` continuously (linear in time).
with_previous=true plays this step at the same time as the previous one (e.g. move
a curve and a dot together); not after a wait. `note` is a label for you (not
drawn). Arguments that do not apply to `kind` are rejected.
输入参数tokind必填notezoomparamvaluefocus_xfocus_ytargetsdurationscene_idproject_id另有 1 个
Change an existing object in place (only the fields you pass). Use it to
reposition, rescale, recolor, retype text/LaTeX, replace plot functions or
ranges, or adjust an area/Riemann interval -- no need to rebuild the scene.
Explicit line/arrow segments move by their endpoints x1, y1, x2, y2.
Everything is validated first: on error nothing changes. A plot's color is the
default color of its curves without one (axes keep the theme ink). Areas, Riemann
sums and anchored shapes follow their plot: move the plot instead.
输入参数xydxx1x2y1y2texat_xat_ysizetext另有 17 个
Delete an object. If steps or other objects (areas, anchored shapes) depend on
it, nothing is removed unless cascade=true, which also removes the dependent
objects and takes the removed ids out of steps (a step left with nothing to
animate is deleted; other targets of a shared step stay). The reply lists exactly
what was deleted or changed, and any object left without a step.
输入参数cascadescene_idobject_id必填project_id
Delete one step of the timeline (later steps are renumbered). A with_previous
step that was joined to the removed one starts its own beat; it is listed in
regrouped_steps.
输入参数scene_idproject_idstep_index必填
Verify a scene WITHOUT rendering video (~1-2 s): builds the real Manim objects
and measures them -- LaTeX/expression compile errors, off-screen objects, label
collisions, curve fidelity (drawn vs true function), legibility, timing.
Call it after authoring and fix what it reports before render_scene.
输入参数scene_idproject_id
Automatically repair measured problems that have a mechanical fix: objects
pushed back inside the frame, labels moved to the nearest free spot, curve
sampling corrected, too-small text enlarged. Repeats measure->fix up to
max_rounds, reports every change, and lists what still needs the author.
输入参数scene_idmax_roundsproject_id
Render one scene to video + sampled frames, then run verification lanes.
The scene is measured first; if it cannot compile, no render is attempted.
输入参数scene_idproject_id
Fast single-still preview of a scene (last frame).
输入参数scene_idproject_id
Export the latest render of a scene as a shareable GIF, resampled to `width`
pixels wide at `fps` (defaults keep GIFs small). Blocked by open error
obligations of that render and by edits made since it.
输入参数fpswidthscene_idproject_id
Which providers are present (Manim, LaTeX, ffmpeg, vision) and what degrades without each.
无需输入参数。