|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
|
inline |
Resample a path to a fixed point count at uniform arc length.
| path | Positions in chronological order, at least two |
| count | Output point count, minimum 2 |
count points evenly spaced along the path by distanceRemoves speed from the path entirely. Two strokes tracing the same shape, one hurried through its middle and one dwelling there, produce different sample distributions in time and identical ones after this, which is the precondition for comparing them point against point.
A path whose total length is below the epsilon guard is degenerate, every sample having landed in effectively one place, and is returned as count copies of its first point rather than dividing by zero.
MotionCurves::reparameterize_by_arc_length does the same thing over an Eigen::MatrixXd with columns as points. This exists so a caller holding glm::vec2 samples does not transpose into a matrix and back for what is a linear walk.
Definition at line 45 of file PathShape.hpp.
References count, out, and total.
Referenced by shape_distance(), and turning_profile().
Here is the caller graph for this function: