Random non overlapping circles(with circle number controlled) in python and pygame
问题 I was writing the code for non overlapping random circles with different radii.I kind of got the deserved, but my 'if' statement that checks overlap or non overlap excludes a number of circles. So, I get lesser number of circles. Here's the code: import pygame import numpy as np pygame.init() display_width = 800 display_height = 500 black = [0, 0, 0] white = [255, 255, 255] red = [255, 0, 0] display_surface = pygame.display.set_mode((display_width, display_height)) clock = pygame.time.Clock()