Qwt User's Guide 6.3.0
|
Curve parametrization used for a spline interpolation. More...
#include <qwt_spline_parametrization.h>
Public Types | |
enum | Type { ParameterX , ParameterY , ParameterUniform , ParameterChordal , ParameterCentripetal , ParameterManhattan } |
Parametrization type. More... | |
Public Member Functions | |
QwtSplineParametrization (int type) | |
virtual | ~QwtSplineParametrization () |
Destructor. | |
int | type () const |
virtual double | valueIncrement (const QPointF &, const QPointF &) const |
Calculate the parameter value increment for 2 points. | |
Static Public Member Functions | |
static double | valueIncrementX (const QPointF &, const QPointF &) |
Calculate the ParameterX value increment for 2 points. | |
static double | valueIncrementY (const QPointF &, const QPointF &) |
Calculate the ParameterY value increment for 2 points. | |
static double | valueIncrementUniform (const QPointF &, const QPointF &) |
Calculate the ParameterUniform value increment. | |
static double | valueIncrementChordal (const QPointF &, const QPointF &) |
Calculate the ParameterChordal value increment for 2 points. | |
static double | valueIncrementCentripetal (const QPointF &, const QPointF &) |
Calculate the ParameterCentripetal value increment for 2 points. | |
static double | valueIncrementManhattan (const QPointF &, const QPointF &) |
Calculate the ParameterManhattan value increment for 2 points. | |
Curve parametrization used for a spline interpolation.
Parametrization is the process of finding a parameter value for each curve point - usually related to some physical quantity ( distance, time ... ).
Often accumulating the curve length is the intended way of parametrization, but as the interpolated curve is not known in advance an approximation needs to be used.
The values are calculated by cumulating increments, that are provided by QwtSplineParametrization. As the curve parameters need to be montonically increasing, each increment need to be positive.
QwtSplineParametrization provides the most common used type of parametrizations and offers an interface to inject custom implementations.
Definition at line 44 of file qwt_spline_parametrization.h.
Parametrization type.
Enumerator | |
---|---|
ParameterX | No parametrization: t[i] = x[i]
|
ParameterY | No parametrization: t[i] = y[i]
|
ParameterUniform | Uniform parametrization: t[i] = i; A very fast parametrization, with good results, when the geometry of the control points is somehow "equidistant". F.e. when recording the position of a body, that is moving with constant speed every n seconds.
|
ParameterChordal | Parametrization using the chordal length between two control points The chordal length is the most commonly used approximation for the curve length.
|
ParameterCentripetal | Centripetal parametrization Based on the square root of the chordal length. Its name stems from the physical observations regarding the centripetal force, of a body moving along the curve.
|
ParameterManhattan | Parametrization using the manhattan length between two control points Approximating the curve length by the manhattan length is faster than the chordal length, but usually gives worse results.
|
Definition at line 48 of file qwt_spline_parametrization.h.
|
explicit |
Constructor
type | Parametrization type |
Definition at line 17 of file qwt_spline_parametrization.cpp.
|
virtual |
Destructor.
Definition at line 23 of file qwt_spline_parametrization.cpp.
int QwtSplineParametrization::type | ( | ) | const |
Definition at line 72 of file qwt_spline_parametrization.cpp.
|
virtual |
Calculate the parameter value increment for 2 points.
point1 | First point |
point2 | Second point |
Definition at line 35 of file qwt_spline_parametrization.cpp.
|
inlinestatic |
Calculate the ParameterCentripetal value increment for 2 points.
point1 | First point |
point2 | Second point |
Definition at line 196 of file qwt_spline_parametrization.h.
|
inlinestatic |
Calculate the ParameterChordal value increment for 2 points.
point1 | First point |
point2 | Second point |
Definition at line 179 of file qwt_spline_parametrization.h.
|
inlinestatic |
Calculate the ParameterManhattan value increment for 2 points.
point1 | First point |
point2 | Second point |
Definition at line 210 of file qwt_spline_parametrization.h.
|
inlinestatic |
Calculate the ParameterUniform value increment.
point1 | First point |
point2 | Second point |
Definition at line 162 of file qwt_spline_parametrization.h.
|
inlinestatic |
Calculate the ParameterX value increment for 2 points.
point1 | First point |
point2 | Second point |
Definition at line 134 of file qwt_spline_parametrization.h.
|
inlinestatic |
Calculate the ParameterY value increment for 2 points.
point1 | First point |
point2 | Second point |
Definition at line 148 of file qwt_spline_parametrization.h.