movement¶
High-value geometric animations that are not simple context composition.
Algan’s
AnimationContext system
already replaces most of Manim’s small Animation subclasses: fades, rotations,
scales, method calls, and grouped/succession animations are ordinary Mob
operations nested in Sync, Seq, and Lag. This module is reserved
for animations which need reusable geometric algorithms rather than merely a
convenience class.
Functions
- ApplyComplexFunction(mob, function=None, *, about_point=tensor([0., 0., 0.]), runtime=1.0, easing=None)[source]¶
Animate a complex map on the x-y plane while preserving z.
- Parameters:
runtime (float)
- ApplyMatrix(mob, matrix=None, *, about_point=tensor([0., 0., 0.]), runtime=1.0, easing=None)[source]¶
Animate a 2×2 or 3×3 linear transform about
about_point.Accepts both
ApplyMatrix(mob, matrix)and Manim’sApplyMatrix(matrix, mob)argument order.- Parameters:
runtime (float)
- ApplyPointwiseFunction(mob, function=None, *, about_point=tensor([0., 0., 0.]), runtime=1.0, easing=None)[source]¶
Animate an arbitrary point mapping over all renderable geometry.
Both
ApplyPointwiseFunction(mob, function)and Manim’s argument orderApplyPointwiseFunction(function, mob)are accepted. The function may operate on a whole[..., 3]torch tensor or on one NumPy point at a time.- Parameters:
runtime (float)
- ComplexHomotopy(mob, complex_homotopy=None, *, runtime=2.0, easing=None)[source]¶
Animate
f(z, t)on the x-y plane while preserving z.- Parameters:
runtime (float)
- Homotopy(mob, homotopy_func=None, *, runtime=2.0, easing=None)[source]¶
Animate a continuous point deformation.
The existing Algan vectorized API
f(points, t)remains supported, and Manim’s scalarf(x, y, z, t)callback form is accepted as well. Unlike the former implementation, this works for surfaces and triangle meshes in addition to cubic Bezier paths.- Parameters:
runtime (float)
- MoveAlongPath(mob, path, *, runtime=1.0, easing=None, samples_per_curve=24)[source]¶
Move
mobalong the arc length of a cubic Bezier path.The path may itself animate in the same context; its materialized control points are sampled for every frame.
samples_per_curvecontrols only the arc-length approximation, not the rendered geometry.
- PhaseFlow(mob, function=None, *, virtual_time=1.0, integration_steps=32, runtime=1.0, easing=<function identity>)[source]¶
Flow geometry through a vector field using deterministic RK4 integration.
The result is independent of render frame rate and batch boundaries, unlike an updater that repeatedly applies a small Euler step.
- Parameters:
virtual_time (float)
integration_steps (int)
runtime (float)