from spaceAround import * def getSpaceIdxAround(center, nbAround, space): if (nbAround < len(space.calculatedSpaceAroundIdx)): spaceAround = space.calculatedSpaceAroundIdx[nbAround] else: spaceAround = findCoordAround(center,nbAround) space.calculatedSpaceAroundIdx.append(spaceAround) return applySapceAroundToCase(center,spaceAround,space) def selectPointsInRange(points, coord, distance,space): found = [] for point in points: if point.getDistFromCoord(coord) <= distance: found.append(point) return found def foundMaxIndex(dist): return dist.index(max(dist))