neurom.morphmath.path_fraction_id_offset

neurom.morphmath.path_fraction_id_offset(points, fraction, relative_offset=False)[source]

Find the segment which corresponds to the fraction of the path length along the piecewise linear curve which is constructed from the set of points.

Parameters:
  • points – an iterable of indexable objects with indices
  • 1, 2 correspoding to 3D cartesian coordinates (0,) –
  • fraction – path length fraction (0.0 <= fraction <= 1.0)
  • relative_offset – return absolute or relative segment distance
Returns:

(segment ID, segment offset) pair.