- class CyclicReplace(mobject=None, *args, use_override=True, **kwargs)#
An animation moving mobjects cyclically.
In particular, this means: the first mobject takes the place of the second mobject, the second one takes the place of the third mobject, and so on. The last mobject takes the place of the first one.
mobjects – List of mobjects to be transformed.
path_arc – The angle of the arc (in radians) that the mobjects will follow to reach their target.
kwargs – Further keyword arguments that are passed to
Example: CyclicReplaceExample ¶
from manim import * class CyclicReplaceExample(Scene): def construct(self): group = VGroup(Square(), Circle(), Triangle(), Star()) group.arrange(RIGHT) self.add(group) for _ in range(4): self.play(CyclicReplace(*group))