Code
size (310,280);
background (44,240,160);
fill(200, 130, 255);
smooth();
for (int y = 25; y < 270; y +=25) {
for (int x = 25; x < 300; x += 25) {
if ((y % 10) == 0) {
ellipse (x+10, y, 15, 15);
}else{
ellipse (x, y, 15, 15);
}
}
}
0201 - Nested Iteration I: A grid of elements, some indented
Statement:"Nested iteration" refers to the idea of setting up a repetition of repetitions. Reread the section on "Nested Iteration" described on pages 65-67 in the Reas & Fry Processing book.
Use nested iteration to create a grid of small ellipses, such that even rows are indented by one-half of your grid's spacing. You must not use separate for{} loops for the odd and even rows. An example of such a design can be seen here:

Hint: A number N is odd if it has 1 left over after dividing by 2 -- that is, if (N%2 == 1). Likewise, a number is even if it has no remainder after dividing by 2. In other words, I'd prefer you to solve this problem by writing a detector for odd and even numbers. Do you understand? See the last example on page 66 for some more hints.
If you spin this really fast, it looks crazy! (@_@)