from manim import *
import numpy as np
def head(cn, en):
    t = Text(cn, font="STLiti", font_size=28).to_edge(UP)
    s = Text(en, font="Consolas", font_size=21, color=YELLOW).next_to(t, DOWN, buff=0.10)
    return VGroup(t, s)
def foot(cn):
    return Text(cn, font="STLiti", font_size=20, color=YELLOW).to_edge(DOWN)
class ShapeDemo(Scene):
    def construct(self):
        self.add(head("基础图形：圆", "Circle"))
        shape = Circle(radius=2, color=BLUE).set_stroke(width=7)
        self.play(Create(shape), run_time=2.2)
        self.play(shape.animate.set_stroke(YELLOW, width=7), run_time=1.2)
        self.play(FadeIn(foot("Circle 只需半径，圆心默认在原点")), run_time=0.4)
        self.wait(2.2)
