distance_vector#
- static GeometryOperators.distance_vector(p, a, b)[source]#
Evaluate the vector distance between point
p
and a line defined by two points,a
andb
.Note
he formula is
d = (a-p)-((a-p)dot p)n
, wherea
is a point of the line (eithera
orb
) andn
is 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:
List
List of
[x, y, z]
coordinates for the distance vector.