manim.animation.movement.MoveAlongPath

class MoveAlongPath(mobject, path, suspend_mobject_updating=False, **kwargs)[source]

Bases: manim.animation.animation.Animation

Make one mobject move along the path of another mobject. .. rubric:: Example

MoveAlongPathExample
class MoveAlongPathExample(Scene):
    def construct(self):
        d1 = Dot().set_color(ORANGE)
        l1 = Line(LEFT, RIGHT)
        l2 = VMobject()
        self.add(d1, l1, l2)
        l2.add_updater(lambda x: x.become(Line(LEFT, d1.get_center()).set_color(ORANGE)))
        self.play(MoveAlongPath(d1, l1), rate_func=linear)

Methods

interpolate_mobject

Parameters
  • mobject (Mobject) –

  • path (numpy.ndarray) –

  • suspend_mobject_updating (Optional[bool]) –

Return type

None