parameters: (shape, pts, winRad, maxGridVal, targetNumber=5)
docstring: adds a set of new terminal points using a max-min algorithm
docstring_summary: adds a set of new terminal points using a max-min algorithm
docstring_tokens: adds a set of new terminal points using a max - min algorithm
function: def GetMoreTerminalPoints(shape, pts, winRad, maxGridVal, targetNumber=5):
    """ adds a set of new terminal points using a max-min algorithm
    """
    shapeGrid = shape.grid
    shapeVect = shapeGrid.GetOccupancyVect()
    nGridPts = len(shapeVect)
    # loop, taking the grid point with the maximum minimum distance, until
    # we have enough points
    while len(pts) < targetNumber:
      maxMin = -1
      for i in range(nGridPts):
        if shapeVect[i] < maxGridVal:
          continue
        minVal = 1e8
        posI = shapeGrid.GetGridPointLoc(i)
        for currPt in pts:
          dst = posI.Distance(currPt.location)
          if dst < minVal:
            minVal = dst
        if minVal > maxMin:
          maxMin = minVal
          bestPt = posI
      count, centroid = Geometry.ComputeGridCentroid(shapeGrid, bestPt, winRad)
      pts.append(SubshapeObjects.SkeletonPoint(location=centroid))
function_tokens: def GetMoreTerminalPoints ( shape , pts , winRad , maxGridVal , targetNumber = 5 ) : shapeGrid = shape . grid shapeVect = shapeGrid . GetOccupancyVect ( ) nGridPts = len ( shapeVect ) # loop, taking the grid point with the maximum minimum distance, until # we have enough points while len ( pts ) < targetNumber : maxMin = - 1 for i in range ( nGridPts ) : if shapeVect [ i ] < maxGridVal : continue minVal = 1e8 posI = shapeGrid . GetGridPointLoc ( i ) for currPt in pts : dst = posI . Distance ( currPt . location ) if dst < minVal : minVal = dst if minVal > maxMin : maxMin = minVal bestPt = posI count , centroid = Geometry . ComputeGridCentroid ( shapeGrid , bestPt , winRad ) pts . append ( SubshapeObjects . SkeletonPoint ( location = centroid ) )