|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
|
inlinenoexcept |
Signed curvature from velocity and acceleration.
| vel | Velocity vector |
| accel | Acceleration vector |
| min_speed | Speed below which curvature is reported as 0 rather than computed. Default 1e-3, not 1e-6: curvature divides by speed^3, so at real input scales (e.g. normalized 0..1 tablet coordinates per second, where a slow-moving stroke is speed 0.05-0.5) a guard near machine epsilon never fires, and the cubic denominator still amplifies ordinary acceleration noise into numbers in the thousands. The threshold has to be picked relative to the caller's actual speed scale, not left at a constant close to zero; 1e-3 is a reasonable default for normalized 0..1 spatial data but a caller working in different units (pixels, millimeters) should pass one appropriate to that scale rather than rely on this default. |
dtheta/ds rather than dtheta/dt: speed-independent, so a sharp corner drawn slowly and the same corner drawn fast report the same curvature, unlike angular_velocity which conflates turn sharpness with pace. Positive is a leftward (CCW) bend, negative rightward. Even with a correctly scaled min_speed, curvature remains numerically sensitive near that threshold since it is still a cubic denominator; treat curvature values from low-speed samples as low-confidence regardless of whether they cleared the guard.
Definition at line 418 of file Differential.hpp.
References cross_2d().
Referenced by channel_curvature(), compute_path_curvature(), and curvature_from_history().
Here is the call graph for this function:
Here is the caller graph for this function: