hello, i’m a beginner on processing and I want to make something simple but I don’t really understand why it don’t work.
here’s my code :
void setup()
{
size(600, 600);
background(255);
}
void draw()
{
for (int a = 0; a<width; a+=1)
{
rect(100, 100, a, 100);
if (a>450)
{
a+=0;
}
}
}
what i want it to do is draw a rectangle that get larger (fro left to right) and when this rectangle get
close to the width of the window it stop growing and it stay in this position.
actually i managed to make it growing but when i put the “if” and what’s in it start already grown untill outside and it don’t work.
thanks for your help.