Hi,
the graphics are only renderd once at the end of draw(), so on each frame there is only one image displayed.
Therefore delay() is not an option.
frameCount is a good possibility to change things over time.
For example:
- int distance;
void setup() {
size(200, 200);
frameRate(25);
}
void draw() {
background(204);
distance = 10+frameCount0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
rect(20+distance*j, 20+distance*i, distance/5, distance/5);
}
}
}