A cubic spline. More...
#include <qwt_spline_cubic.h>
Classes | |
class | PrivateData |
Public Member Functions | |
virtual QVector< QLineF > | bezierControlLines (const QPolygonF &points) const QWT_OVERRIDE |
Interpolate a curve with Bezier curves. More... | |
virtual QVector< double > | curvatures (const QPolygonF &) const QWT_OVERRIDE |
Find the second derivative at the control points. More... | |
virtual uint | locality () const QWT_OVERRIDE |
virtual QPainterPath | painterPath (const QPolygonF &) const QWT_OVERRIDE |
Interpolate a curve with Bezier curves. More... | |
virtual QVector< QwtSplinePolynomial > | polynomials (const QPolygonF &) const QWT_OVERRIDE |
Calculate the interpolating polynomials for a non parametric spline. More... | |
QwtSplineCubic () | |
Constructor The default setting is a non closing natural spline with no parametrization. More... | |
virtual QVector< double > | slopes (const QPolygonF &) const QWT_OVERRIDE |
Find the first derivative at the control points. More... | |
virtual | ~QwtSplineCubic () |
Destructor. More... | |
Public Member Functions inherited from QwtSplineC2 | |
virtual QPolygonF | equidistantPolygon (const QPolygonF &, double distance, bool withNodes) const QWT_OVERRIDE |
Find an interpolated polygon with "equidistant" points. More... | |
QwtSplineC2 () | |
Constructor. More... | |
virtual | ~QwtSplineC2 () |
Destructor. More... | |
Public Member Functions inherited from QwtSplineC1 | |
QwtSplineC1 () | |
Constructor. More... | |
virtual double | slopeAtBeginning (const QPolygonF &, double slopeNext) const |
virtual double | slopeAtEnd (const QPolygonF &, double slopeBefore) const |
virtual | ~QwtSplineC1 () |
Destructor. More... | |
Public Member Functions inherited from QwtSplineG1 | |
QwtSplineG1 () | |
Constructor. More... | |
virtual | ~QwtSplineG1 () |
Destructor. More... | |
Public Member Functions inherited from QwtSplineInterpolating | |
virtual QPolygonF | polygon (const QPolygonF &, double tolerance) const QWT_OVERRIDE |
Interpolate a curve by a polygon. More... | |
QwtSplineInterpolating () | |
Constructor. More... | |
virtual | ~QwtSplineInterpolating () |
Destructor. More... | |
Public Member Functions inherited from QwtSpline | |
int | boundaryCondition (BoundaryPosition) const |
BoundaryType | boundaryType () const |
double | boundaryValue (BoundaryPosition) const |
const QwtSplineParametrization * | parametrization () const |
QwtSpline () | |
Constructor. More... | |
void | setBoundaryCondition (BoundaryPosition, int condition) |
Define the condition for an endpoint of the spline. More... | |
void | setBoundaryConditions (int condition, double valueBegin=0.0, double valueEnd=0.0) |
Define the condition at the endpoints of a spline. More... | |
void | setBoundaryType (BoundaryType) |
void | setBoundaryValue (BoundaryPosition, double value) |
Define the boundary value. More... | |
void | setParametrization (int type) |
void | setParametrization (QwtSplineParametrization *) |
virtual | ~QwtSpline () |
Destructor. More... | |
Private Attributes | |
PrivateData * | m_data |
Additional Inherited Members | |
Public Types inherited from QwtSplineC2 | |
enum | BoundaryConditionC2 { CubicRunout = LinearRunout + 1, NotAKnot } |
Public Types inherited from QwtSpline | |
enum | BoundaryCondition { Clamped1, Clamped2, Clamped3, LinearRunout } |
Boundary condition. More... | |
enum | BoundaryPosition { AtBeginning, AtEnd } |
enum | BoundaryType { ConditionalBoundaries, PeriodicPolygon, ClosedPolygon } |
A cubic spline.
A cubic spline is a spline with C2 continuity at all control points. It is a non local spline, what means that all polynomials are changing when one control point has changed.
The implementation is based on the fact, that the continuity condition means an equation with 3 unknowns for 3 adjacent points. The equation system can be resolved by defining start/end conditions, that allow substituting of one of the unknowns for the start/end equations.
Resolving the equation system is a 2 pass algorithm, requiring more CPU costs than all other implemented type of splines.
Definition at line 33 of file qwt_spline_cubic.h.
QwtSplineCubic::QwtSplineCubic | ( | ) |
Constructor The default setting is a non closing natural spline with no parametrization.
Definition at line 966 of file qwt_spline_cubic.cpp.
|
virtual |
Destructor.
Definition at line 979 of file qwt_spline_cubic.cpp.
|
virtual |
Interpolate a curve with Bezier curves.
Interpolates a polygon piecewise with cubic Bezier curves and returns the 2 control points of each curve as QLineF.
points | Control points |
Reimplemented from QwtSplineC2.
Definition at line 1149 of file qwt_spline_cubic.cpp.
|
virtual |
Find the second derivative at the control points.
points | Control nodes of the spline |
Implements QwtSplineC2.
Definition at line 1078 of file qwt_spline_cubic.cpp.
|
virtual |
A cubic spline is non local, where changing one point has em effect on all polynomials.
Reimplemented from QwtSpline.
Definition at line 989 of file qwt_spline_cubic.cpp.
|
virtual |
Interpolate a curve with Bezier curves.
Interpolates a polygon piecewise with cubic Bezier curves and returns them as QPainterPath.
points | Control points |
Reimplemented from QwtSplineC2.
Definition at line 1130 of file qwt_spline_cubic.cpp.
|
virtual |
Calculate the interpolating polynomials for a non parametric spline.
points | Control points |
Reimplemented from QwtSplineC2.
Definition at line 1167 of file qwt_spline_cubic.cpp.
|
virtual |
Find the first derivative at the control points.
In opposite to the implementation QwtSplineC2::slopes the first derivates are calculated directly, without calculating the second derivates first.
points | Control nodes of the spline |
Reimplemented from QwtSplineC2.
Definition at line 1006 of file qwt_spline_cubic.cpp.
|
private |
Definition at line 57 of file qwt_spline_cubic.h.