Exemplo n.º 1
0
def angleCost(a, b, c, d):
    '''prefers straighter lines'''
    abDir = np.array(b) - np.array(a)
    cdDir = np.array(d) - np.array(c)
    difference = cluster_util.findAngle(abDir, cdDir)
    if np.isnan(difference): return 0
    else: return np.abs(difference)
Exemplo n.º 2
0
def oldAngleCost(a, b, c):
    '''angle cost of going to c given we came from ab'''
    abDir = np.array(b) - np.array(a)
    bcDir = np.array(c) - np.array(b)
    difference = cluster_util.findAngle(abDir, bcDir)
    if np.isnan(difference): return 0
    else: return np.abs(difference)
Exemplo n.º 3
0
def oldAngleCost(a, b, c):
    '''angle cost of going to c given we came from ab'''
    abDir = np.array(b) - np.array(a)
    bcDir = np.array(c) - np.array(b)
    difference = cluster_util.findAngle(abDir, bcDir)
    if np.isnan(difference): return 0
    else: return np.abs(difference)
Exemplo n.º 4
0
def angleCost(a, b, c, d):
    '''prefers straighter lines'''
    abDir = np.array(b) - np.array(a)
    cdDir = np.array(d) - np.array(c)
    difference = cluster_util.findAngle(abDir, cdDir)
    if np.isnan(difference): return 0
    else: return np.abs(difference)
Exemplo n.º 5
0
def angleCost(a, b, c, d):
    '''prefers straighter lines'''
    abDir = b - a
    cdDir = d - c
    difference = cluster_util.findAngle(abDir, cdDir)
    if np.isnan(difference): return 0
    else: return np.abs(difference)