- resqpy.lines.tangents(points, weight='linear', closed=False)¶
Returns a numpy array of tangent unit vectors for an ordered list of points.
points (numpy float array of shape (N, 3)) – points defining a line
weight (string, default 'linear') – one of ‘linear’, ‘square’ or ‘cube’, giving increased weight to relatively shorter of 2 line segments at each knot
closed (boolean, default False) – if True, the points are treated as a closed polyline with regard to end point tangents, otherwise as an open line
numpy float array of the same shape as points, containing a unit length tangent vector for each knot (point)
if two neighbouring points are identical, a divide by zero will occur