float[] lineX = new float[lineNum];
float[] lineY = new float[lineNum];
float[] lineX1 = new float[lineNum];
float[] lineY1 = new float[lineNum];
float[] ellX = new float[ellNum];
float[] ellY = new float[ellNum];
float[] ellD = new float[ellNum];
float[] rectX = new float[rectNum];
float[] rectY = new float[rectNum];
float[] rectW = new float[rectNum];
float[] rectH = new float[rectNum];
color[] r = new color[50];
color[] g = new color[50];
color[] b = new color[50];
boolean clickButton = false;
gridColor = color(random(255), random(255), random(255));
for (float x = -width; x<=width; x= x+20) {
for (float y = -height; y<=height; y=y+20) {
float diameter = dist(gridX, gridY, x+gridX, y+gridY) / 20;
ellipse(gridX + x, gridY + y, diameter, diameter);
for (int i=0; i<lineNum; i++) {
r[i] = color(random(255), random(200), random(200));
lineX[i] = random(width);
lineY[i] = random(height);
line(lineX[i], lineY[i], lineX1[i], lineY1[i]);
for (int i=0; i<ellNum; i++) {
g[i] = color(random(200), random(255), random(200));
ellY[i] = random(height);
ellipse(ellX[i], ellY[i], ellD[i], ellD[i]);
for (int i=0; i<rectNum; i++) {
b[i] = color(random(200), random(200), random(255));
rectX[i] = random(width);
rectY[i] = random(height);
rect(rectX[i], rectY[i], rectW[i], rectH[i]);
gridColor = color (random (255), random (255), random(255) );