void setup() { size (500, 500); } void draw() { background(255); for (int i= 0;i< 10;i++) { translate(30, 0); // translating by 30 pixels to the right every time around. This is relative, so it increments rect (0, 0, 20, 20); // note that the rects are drawn incrementely to the right even though the params say (0,0... } }