float[]rectx = new float [numRects];
float[]recty = new float [numRects];
float[]rectW = new float [numRects];
float[]rectH = new float [numRects];
float [] rectspeedx = new float [numRects];
float [] rectspeedy = new float [numRects];
color [] Colorchangerect = new color[numRects];
float[] ballx = new float [numCircs];
float[] bally = new float [numCircs];
float[] ballW = new float [numCircs];
float[] ballH = new float [numCircs];
float [] circspeedx = new float [numCircs];
float [] circspeedy = new float [numCircs];
color [] Colorchangecirc = new color[numCircs];
for (int i = 0; i < numRects; i++) {
recty[i] = random(height);
rectx[i] = random(width);
rectspeedx[i]= random(100);
rectspeedy[i]= random(100);
Colorchangerect[i] = color(random(255), random(255), random(0));
for (int i = 0; i < numCircs; i++) {
bally[i] = random(height);
ballx[i] = random(width);
circspeedx[i]= random(5);
circspeedy[i]= random(5);
Colorchangecirc[i] = color(random(255), random(255), random(255));
for (int c = 0; c < numCircs; c++) {
fill ( Colorchangecirc[c]);
ellipse (ballx[c], bally[c], 30, 30);
ballx[c]= ballx[c] + circspeedx[c];
bally[c]= bally[c] + circspeedy[c];
if ( (ballx[c] >width) || (ballx[c] < 10) ) {
circspeedx[c] = circspeedx[c] * -1;
if ((bally[c] > height) || (bally[c] < 10) ) {
circspeedy[c] = circspeedy[c] * -1;
for (int c = 0; c < numRects; c++) {
fill(Colorchangerect[c]);
rect (rectx[c], recty[c], 50, 50);
if ( (rectx[c] >width) || (rectx[c] < 10) ) {
rectspeedx[c] = rectspeedx[c] * -1;
if ( (recty[c] > height) || (recty[c] < 10) ) {
rectspeedy[c] = rectspeedy[c] * -1;
for (int i = 0; i < numRects; i++) {
Colorchangerect[i] = color(random(255), random(255), 0);
for (int i = 0; i < numCircs; i++) {
Colorchangecirc[i] = color(random(255), 0, random(255));