CodingTrain / website-archive

Archive of the Coding Train website (first version)
https://codingtrain.github.io/website-archive/
MIT License
5.72k stars 5.67k forks source link

this code is giving me an arrayIndexOutOfBoundesException(processing 3.5.4) #3634

Closed dezi9dezi closed 2 years ago

dezi9dezi commented 2 years ago

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); } }

KobeLiesenborgs commented 2 years ago

Hey Dezi! This repository manages the Coding Train website, it isn't the right place for questions. The best things you can do is join our discord.

Hope to see you there!