MacBook Air M3
Processing 4.5.6 (but also older versions apply)
This runs at around 8.5 fps.
void setup() {
size(800, 800, P2D);
frameRate(999);
}
void draw() {
background(0);
int cols = 16;
int rows = 16;
float margin = 50;
float gap = 10;
float rectW = (width - margin * 2 - gap * (cols - 1)) / cols;
float rectH = (height - margin * 2 - gap * (rows - 1)) / rows;
fill(255, 220, 0);
stroke(255);
strokeWeight(2);
for (int y = 0; y < rows; y++) {
for (int x = 0; x < cols; x++) {
float px = margin + x * (rectW + gap);
float py = margin + y * (rectH + gap);
rect(px, py, rectW, rectH, 10);
}
}
println(frameRate);
}
MacBook Air M3
Processing 4.5.6 (but also older versions apply)
This runs at around 8.5 fps.