from manim import *
class CounterOneDemo(Scene):
    def construct(self):
        title = Text("CounterclockwiseTransform：五边形逆时针变八边形", font="STLiti", font_size=26).to_edge(UP)
        self.play(FadeIn(title), run_time=0.6)
        pentagon = RegularPolygon(n=5, color=GREEN, stroke_width=8).scale(1.2).move_to(UP * 0.2 + LEFT * 2)
        octagon = RegularPolygon(n=8, color=RED, stroke_width=8).scale(1.2).move_to(UP * 0.2 + RIGHT * 2)
        self.play(FadeIn(pentagon), run_time=0.8)
        self.play(CounterclockwiseTransform(pentagon, octagon), run_time=2.4)
        note = Text("path_arc 为正值，走逆时针弧线", font="STLiti", font_size=21, color=YELLOW).to_edge(DOWN)
        self.play(FadeIn(note), run_time=0.4)
        self.wait(1.8)
