code: def grid(self, cols, rows, colSize=1, rowSize=1, shuffled=False):
          
          # Taken ipsis verbis from Nodebox
          from random import shuffle
          rowRange = range(int(rows))
          colRange = range(int(cols))
          if (shuffled):
              shuffle(rowRange)
              shuffle(colRange)
          for y in rowRange:
              for x in colRange:
                  yield (x * colSize, y * rowSize)
docs: Returns an iterator that contains coordinate tuples.
          The grid can be used to quickly create grid-like structures.
          A common way to use them is:
              for x, y in grid(10,10,12,12):
                  rect(x,y, 10,10)