Exercise 28
by Haig. Average Reading Time: less than a minute.
Now let’s change our rectangle to a circle and adjust the spacing
size(400, 400);
noStroke();
background(255);
float x = 0;
while (x < width) {
float y = 0;
while (y 98) {
fill(255, 0, 0);
}
else {
// but usually pick a random gray color
fill(random(100, 200));
}
ellipse(x+20, y+20, 40, 40);
y = y + 40;
}
x = x + 40;
}
No comments on ‘Exercise 28’
Leave a Reply