void setup() { size(500, 500); colorMode(RGB); background(20,0,55); noStroke(); smooth(); frameRate(24); } void draw() { int box_height =20; int box_width = 20; int base_color = 800; int y_color = 800; for(int i=0;i<50;i++) { for(int j=0;j<50;j++) { int e = int(random(5)); float r_color = random(8,y_color); float distance = dist(j * box_width, i * box_height, mouseX, mouseY); fill(200 - distance, 10, 40); ellipse(j*box_width, i*box_height, box_width, box_height); } } }