import math


def segdist(P1, P2):
    """
    Distance between two points, used for triangle
    """
    seg = math.sqrt(math.pow(P2[0]-P1[0],2) + math.pow(P2[1]-P1[1],2) + math.pow(P2[2]-P1[2],2))
    return seg