int size = 100; int cols = 7; int rows = 5; boolean light = false; int a; int b; void setup() { size (700, 500); smooth(); noFill(); noLoop(); background (255); } void draw() { int[][] box = new int[cols][rows]; for (int i = 0; i < cols; i++) { for (int j = 0; j < rows; j++) { box[i][j] = i; int a = i*100; int b = j*100; rect(a, b, 100, 100); println(i, j); int tx1 = int (random(i*100,i*100+50)); int ty1 = int (random(j*100,j * 100 + 50)); rect (tx1,ty1,50,50); int tx2 = int (random(i*100,i*100+50)); int ty2 = int (random(j*100,j * 100 + 50)); rect (tx2,ty2,30,30); int tx3 = int (random(i*100,i*100+50)); int ty3 = int (random(j*100,j * 100 + 50)); rect (tx3,ty3,20,20); int tx4 = int (random(i*100,i*100+50)); int ty4 = int (random(j*100,j * 100 + 50)); rect (tx4,ty4,10,10); int tx5 = int (random(i*100,i*100+40)); int ty5 = int (random(j*100,j * 100 + 40)); rect (tx5,ty5,60,60); int tx6 = int (random(i*100,i*100+30)); int ty6 = int (random(j*100,j * 100 + 30)); rect (tx6,ty6,70,70); int tx7 = int (random(i*100,i*100+20)); int ty7 = int (random(j*100,j * 100 + 20)); rect (tx7,ty7,80,80); int tx8 = int (random(i*100,i*100+10)); int ty8 = int (random(j*100,j * 100 + 10)); rect (tx8,ty8,90,90); int tx9 = int (random(i*100,i*100+50)); int ty9 = int (random(j*100,j * 100 + 50)); rect (tx9,ty9,40,40); int tx10 = int (random(i*100,i*100+50)); int ty10 = int (random(j*100,j * 100 + 50)); rect (tx10,ty10,45,45); //for //if (frameCount > 0.1) { noLoop(); // //println(mouseX + " : " + mouseY); // } } } }