distance_vector#

static GeometryOperators.distance_vector(p, a, b)#

Evaluate the vector distance between point p and a line defined by two points, a and b.

Note

he formula is d = (a-p)-((a-p)dot p)n, where a is a point of the line (either a or b) and n is the unit vector in the direction of the line.

Parameters:
pList

List of [x, y, z] coordinates for the reference point.

aList

List of [x, y, z] coordinates for the first point of the segment.

bList

List of [x, y, z] coordinates for the second point of the segment.

Returns:
List

List of [x, y, z] coordinates for the distance vector.