distance_vector#
- static GeometryOperators.distance_vector(p, a, b)#
Evaluate the vector distance between point
pand a line defined by two points,aandb.Note
he formula is
d = (a-p)-((a-p)dot p)n, whereais a point of the line (eitheraorb) andnis the unit vector in the direction of the line.- Parameters:
- p
List List of
[x, y, z]coordinates for the reference point.- a
List List of
[x, y, z]coordinates for the first point of the segment.- b
List List of
[x, y, z]coordinates for the second point of the segment.
- p
- Returns:
ListList of
[x, y, z]coordinates for the distance vector.