using random& array
hi~ i am really new to processing, and i really need some help.
i want to place 50 ellipses on a board, and i want them to be placed at random.
so, i've come out with this code, but it sadly it doesn't work.
any help will be appreciated very much. thanx!
int numCircles = 50;
Circle[] circles = new Circle[numCircles]; // define the array
void setup() {
size(800,800);
smooth();
noStroke();
}
void draw() {
for (int i=0; i<numCircles; i++) {
circles[i] = new Circle(random(width),random(height-200), 30, 30); // fill the array with circles at random positions
}
}