I just want to do a simple grid with circles, but it just doesn’t work. The circles don’t complete the grid and stop at a random point. The circles stop at a different point each time I run the program. Pls help.
I’m using 3.5.4 btw.
float x = 0;
float y = 0;
boolean a = true;
void setup()
{
size(800, 800);
}
void draw()
{
background(0);
while(a)
{
ellipse(x, y, 50, 50);
x= x+100;
if(x > width)
{
y = y + 100;
x = 0;
}
if(y > height)
{
y=0;
}
println("x", x, "y", y);
}
}