def getAddIndexedGrid(grid, vertexes, z):
 indexedGrid = []
 for row in grid:
  indexedRow = []
  indexedGrid.append(indexedRow)
  for pointComplex in row:
   vector3index = Vector3Index(len(vertexes), pointComplex.real, pointComplex.imag, z)
   indexedRow.append(vector3index)
   vertexes.append(vector3index)
 return indexedGrid

def getAddIndexedGrid ( grid , vertexes , z ) : indexedGrid = [ ] for row in grid : indexedRow = [ ] indexedGrid . append ( indexedRow ) for pointComplex in row : vector3index = Vector3Index ( len ( vertexes ) , pointComplex . real , pointComplex . imag , z ) indexedRow . append ( vector3index ) vertexes . append ( vector3index ) return indexedGrid
get and add an indexed grid .