Exemple #1
0
def max_fields(a):
    n = a.order()
    # Generate a distance matrix for all portals
    pts = np.array([a.node[i]['xy'] for i in range(n)])
    perim = np.array(geometry.getPerim(pts))

    if not triangulate(a, perim):
        logger.debug('Could not triangulate')
        return False

    return True
def add_perim_graph(a, coords_xy):
    if not a.quiet:
        print("Computing convex hull ...")
    a.perim = tr.Polygon(geometry.getPerim(coords_xy), a, convex=True)