from manimvtk import *class TransformChain(Scene): def construct(self): # Start with a circle shapes = [ Circle(color=BLUE), Square(color=GREEN), Triangle(color=RED), Star(color=YELLOW) ] current = shapes[0] self.play(Create(current)) # Transform through each shape for next_shape in shapes[1:]: self.wait(0.5) self.play(Transform(current, next_shape)) self.wait()
from manimvtk import *class LaggedExample(Scene): def construct(self): squares = VGroup(*[ Square(side_length=0.5).shift(RIGHT * i) for i in range(-3, 4) ]) # Staggered creation self.play( LaggedStart(*[Create(s) for s in squares], lag_ratio=0.15) ) self.wait() # Staggered color change self.play( LaggedStart(*[s.animate.set_color(RED) for s in squares], lag_ratio=0.1) ) self.wait()