def fan_triangulate(indices):
    """Return an array of vertices in triangular order using a fan triangulation algorithm."""
    if len(indices[0]) != 4:
        raise ValueError("Assumes working with a sequence of quad indices")
    new_indices = []
    for face in indices:
        new_indices.extend([face[:-1], face[1:]])
    return np.array(new_indices)
Return an array of vertices in triangular order using a fan triangulation algorithm.