def distance(point1, point2):
    """ calc distance between two 3d points """
    return ((point1[0] - point2[0]) ** 2 +
            (point1[1] - point2[1]) ** 2 +
            (point1[2] - point2[2]) ** 2) ** 0.5