from manim import *
class GrowCenterDemo(Scene):
    def construct(self):
        title = Text("GrowFromCenter：以自身中心向四周均匀生长", font="STLiti", font_size=30).to_edge(UP)
        self.play(FadeIn(title), run_time=0.6)
        circle = Circle(radius=1.1, color=WHITE, stroke_width=8).shift(LEFT * 3.4)
        square = Square(side_length=2.0, color=BLUE, stroke_width=8)
        tri = Triangle(color=YELLOW, stroke_width=8).scale(1.1).shift(RIGHT * 3.4)
        self.play(GrowFromCenter(circle, point_color=BLUE), run_time=1.0)
        self.play(GrowFromCenter(square, point_color=YELLOW), run_time=1.0)
        self.play(GrowFromCenter(tri, point_color=RED), run_time=1.0)
        note = Text("三个图形分别设置不同的 point_color", font="STLiti", font_size=21, color=YELLOW).to_edge(DOWN)
        self.play(FadeIn(note), run_time=0.5)
        self.wait(2.2)
