This repository was archived by the owner on Jul 5, 2022. It is now read-only.
This repository was archived by the owner on Jul 5, 2022. It is now read-only.
this code is giving me an arrayIndexOutOfBoundesException(processing 3.5.4) #3634
Closed
Description
PImage spain;
void setup() {
size(900, 600);
spain = loadImage("spain.png");
background(255);
}
void draw() {
for (int i = 0; i<100; i++) {
float x = random(width);
float y = random(height);
float loc = x+y*width;
color col = spain.pixels[int(loc)];
fill(col);
noStroke();
ellipse(x, y, 16, 16);
}
}
Metadata
Metadata
Assignees
Labels
No labels