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 N155_03(Scene):
    def construct(self):
        sc = self
        def create_bubble(self):
            """创建单个彩色气泡"""
            size = random.uniform(*self.bubble_size_range)
            color = random.choice(self.colors)
            bubble = Circle(radius=size, color=color, fill_opacity=0.4, stroke_width=2)
            x_pos = random.uniform(-config.frame_width / 2 + 1, config.frame_width / 2 - 1)
            y_pos = random.uniform(-config.frame_height / 2, -config.frame_height / 2 + 2)
            bubble.move_to([x_pos, y_pos, 0])
            bubble.rise_speed = random.uniform(*self.rise_speed_range)
            bubble.growth_rate = random.uniform(*self.growth_rate_range)
            bubble.fade_rate = random.uniform(*self.fade_rate_range)
            bubble.initial_radius = size
            return bubble
        self.wait(0.5)
