int numSteps = 20; int stepSize = 20; int N = (1+numSteps) * stepSize; size(N, N); background(255); fill(200); // light gray beginShape(); // climb up the left side for (int j=0; j < numSteps; j++) { float x = 0.5*(0.5+j)*stepSize; float y = (numSteps-j+0.5)*stepSize; vertex(x,y); vertex(x,y-stepSize); } // climb down the right side for (int j=0; j < numSteps; j++) { float x = 0.5*(1.5+j+numSteps)*stepSize; float y = (0.5+j)*stepSize; vertex(x,y); vertex(x,y+stepSize); } endShape(CLOSE);