from manim import *
class ShapeMorphDemo(Scene):
    def construct(self):
        title = Text("ReplacementTransform：几何体形态跃迁", font="STLiti", font_size=28).to_edge(UP)
        self.play(FadeIn(title), run_time=0.6)
        circle = Circle(radius=1.1, color=BLUE, stroke_width=9)
        square = Square(side_length=2.0, color=YELLOW, stroke_width=9)
        tri = Triangle(color=RED, stroke_width=9).scale(1.3)
        self.play(FadeIn(circle), run_time=0.7)
        self.play(ReplacementTransform(circle, square), run_time=1.5)
        self.play(ReplacementTransform(square, tri), run_time=1.5)
        self.wait(1.7)
