from manim import *
import numpy as np
from numpy import array, pi, cos, sin
run_time = 1
data = [[1, 2], [3, 4]]
def dot(pos, **kwargs):
    return Dot(pos, **kwargs)
class N124_03(Scene):
    def construct(self):
        sc = self
        f1 = VGroup(MathTex('a', color=RED), MathTex('b', color=GREEN), MathTex('c', color=YELLOW)).arrange(RIGHT, buff=1)
        f2 = MathTex('{{x}}^2', '+', '{{y}}^2', '=', '{{z}}^2')
        f3 = MathTex('{{a}}^2', '+', '{{b}}^2', '=', '{{c}}^2')
        self.play(*[FadeIn(_o) for _o in [f1, f2]], run_time=1.0)
        self.wait()
        self.play(TransformMatchingTex(VGroup(f1, f2), f3))
        f4 = MathTex('{{a}}^2', '=', '{{c}}^2', '-', '{{b}}^2')
        self.play(TransformMatchingTex(f3, f4))
        f5 = MathTex('{{b}}^2', '=', '{{c}}^2', '-', '{{a}}^2')
        self.play(TransformMatchingTex(f4, f5))
        self.wait(0.5)
        self.wait(0.40)