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 N109_03(Scene):
    def construct(self):
        sc = self
        squares = VGroup()
        colors = [BLUE, GREEN, YELLOW]
        for x in range(3):
            for y in range(3):
                square = Square(side_length=0.5, stroke_width=1, stroke_color=RED, fill_opacity=0.5, fill_color=colors[y]).shift(x * 0.5 * RIGHT + y * 0.5 * UP)
                squares.add(square)
        vg = VGroup(squares, squares.copy())
        vg.arrange(RIGHT, buff=1)
        self.play(ShowIncreasingSubsets(vg[0]), ShowSubmobjectsOneByOne(vg[1]), run_time=3)
        self.wait(0.5)
        self.wait(2.10)