I'm trying to using a for loop to add x and y coordinates to a two dimensional array but I'm struggling to work out the syntax to use to do it. My code is below:
- void draw()
- {
- for (int i=0; i<(camWidth*camHeight); i++)
- {
- cam8Strolz = loadImage("http://88.116.117.219/axis-cgi/jpg/image.cgi?resolution=640x480", "jpg");
- int x = int(random(camWidth));
- int y = int(random(camHeight));
- int loc = x + y*camWidth;
- cam8Strolz.loadPixels();
- float r = red(cam8Strolz.pixels[loc]);
- float g = green(cam8Strolz.pixels[loc]);
- float b = blue(cam8Strolz.pixels[loc]);
- noStroke();
- fill(r,g,b,100);
- ellipse(x,y,blurSize,blurSize);
- ellipseArray[i][i] = x; y;
- }
- }
Thanks in adance
1