xxxxxxxxxx
// note: if you don't want to have the grid follow the mouse, create a variable for a point on the screen and replace Mousex and MouseY with that
void setup() {
size(500, 500);
}
void draw() {
background(#3B5554);
noStroke();
fill(#FAE605); // make the grid yellow circles
// using the mouseX and mouseY as the center, draw the grid around it
for (float x = -50; x<=50; x= x+10) {
for (float y = -50; y<=50; y=y+10) {
//Change the size if each circles based on how close or far it is from MouseX and MouseY, which gives it that dot matrix style effect
float diameter = dist(mouseX, mouseY, x+mouseX, y+mouseY) / 10; // advanced
// float diameter = 5; // basic version, all circles are the same size in this grid
ellipse(mouseX + x, mouseY + y, diameter, diameter);
}
}
}