def generate_nodes(self): close = 0.8 # Create N random nodes on the image for _ in range(2): # Create a random Node object with our input next_node = LAPointNode( # Position [ random.choice( random.choice([ range(int(-self.width), int(-close**self.width)), range(int( (2 - close) * self.width), int(2 * self.width)) ])), random.choice( random.choice([ range(int(-self.height), int( -close * self.height)), range(int((2 - close) * self.height), int(2 * self.height)) ])) ], [ # Pixel color based on the minimum and maximum pixel colors for each channel random.randint(100, 255), random.randint(100, 255), random.randint(100, 255), 255 ], 1) yield next_node
def generate_nodes(self): random.seed(uuid.uuid4()) if random.randint(1, 2) == 1: self.subtract_one_from_darkness_bias = True else: self.subtract_one_from_darkness_bias = False # Create N random nodes on the image for _ in range(random.randint(1, 4)): # Create a random Node object with our input next_node = LAPointNode( # Position [ random.randint(0, self.width), random.randint(0, self.height), ], [ # Pixel color based on the minimum and maximum pixel colors for each channel random.randint(0, 255), random.randint(0, 255), random.randint(0, 255), 255 ], 1) yield next_node
def generate_nodes(self): random.seed(self.id) min_stretch = 10 max_stretch = 20 self.noise_red = Noise() self.noise_red.new_simplex(random.randint(min_stretch, max_stretch), random.randint(min_stretch, max_stretch), self.id + 1) self.noise_green = Noise() self.noise_green.new_simplex(random.randint(min_stretch, max_stretch), random.randint(min_stretch, max_stretch), self.id + 2) self.noise_blue = Noise() self.noise_blue.new_simplex(random.randint(min_stretch, max_stretch), random.randint(min_stretch, max_stretch), self.id + 3) # Create N random nodes on the image for _ in range(2): # Create a random Node object with our input next_node = LAPointNode( # Position [ random.randint(0, self.config["width"]), random.randint(0, self.config["height"]), ], [ # Pixel color based on the minimum and maximum pixel colors for each channel random.randint(0, 255), random.randint(0, 255), random.randint(0, 255), 255 ], 1) yield next_node
def generate_nodes(self): # Create N random nodes on the image for _ in range(2): # Create a random Node object with our input next_node = LAPointNode( # Position [ random.randint(0, self.config["width"]), random.randint(0, self.config["height"]), ], [ # Pixel color based on the minimum and maximum pixel colors for each channel random.randint(0, 255), random.randint(0, 255), random.randint(0, 255), 255 ], 1) yield next_node
def generate_nodes(self): random.seed(self.id) self.random_exponent = random.uniform(0.2, 2.4) # White note at the center next_node = LAPointNode( # Position [ width // 2, height // 2, ], [ # Pixel color based on the minimum and maximum pixel colors for each channel 255, 255, 255, 255 ], 1) yield next_node