QwtSplineCubic(3)
πΈ NAME πΈ
okay so bestie, this is the QwtSplineCubic(3) page from the Library Functions Manual, and it is literally all about QwtSplineCubic β a cubic spline. π
β¨ SYNOPSIS β¨
#include <qwt_spline_cubic.h>
Inherits QwtSplineC2.
π Public Member Functions π
QwtSplineCubic ()β Constructor. The default setting is a non closing natural spline with no parametrization.virtual ~QwtSplineCubic ()β Destructor.virtual uint locality () const overridevirtual QPainterPath painterPath (const QPolygonF &) const overrideβ Interpolate a curve with Bezier curves.virtual QVector< QLineF > bezierControlLines (const QPolygonF &points) const overrideβ Interpolate a curve with Bezier curves.virtual QVector< QwtSplinePolynomial > polynomials (const QPolygonF &) const overrideβ Calculate the interpolating polynomials for a non parametric spline.virtual QVector< double > slopes (const QPolygonF &) const overrideβ Find the first derivative at the control points.virtual QVector< double > curvatures (const QPolygonF &) const overrideβ Find the second derivative at the control points.
π¦ Public Member Functions inherited from QwtSplineC2 π¦
QwtSplineC2 ()β Constructor.virtual ~QwtSplineC2 ()β Destructor.virtual QPolygonF equidistantPolygon (const QPolygonF &, double distance, bool withNodes) const overrideβ Find an interpolated polygon withequidistant"points.
π¦ Public Member Functions inherited from QwtSplineC1 π¦
QwtSplineC1 ()β Constructor.virtual ~QwtSplineC1 ()β Destructor.virtual double slopeAtBeginning (const QPolygonF &, double slopeNext) constvirtual double slopeAtEnd (const QPolygonF &, double slopeBefore) const
π¦ Public Member Functions inherited from QwtSplineG1 π¦
QwtSplineG1 ()β Constructor.virtual ~QwtSplineG1 ()β Destructor.
π¦ Public Member Functions inherited from QwtSplineInterpolating π¦
QwtSplineInterpolating ()β Constructor.virtual ~QwtSplineInterpolating ()β Destructor.virtual QPolygonF polygon (const QPolygonF &, double tolerance) const overrideβ Interpolate a curve by a polygon.
π¦ Public Member Functions inherited from QwtSpline π¦
QwtSpline ()β Constructor.virtual ~QwtSpline ()β Destructor.void setParametrization (int type)void setParametrization (QwtSplineParametrization *)const QwtSplineParametrization * parametrization () constvoid setBoundaryType (BoundaryType)BoundaryType boundaryType () constvoid setBoundaryValue (BoundaryPosition, double value)β Define the boundary value.double boundaryValue (BoundaryPosition) constvoid setBoundaryCondition (BoundaryPosition, int condition)β Define the condition for an endpoint of the spline.int boundaryCondition (BoundaryPosition) constvoid setBoundaryConditions (int condition, double valueBegin=0.0, double valueEnd=0.0)β Define the condition at the endpoints of a spline.
π Additional Inherited Members π
π Public Types inherited from QwtSplineC2 π
enum BoundaryConditionC2 { CubicRunout = LinearRunout + 1, NotAKnot }
π Public Types inherited from QwtSpline π
enum BoundaryType { ConditionalBoundaries, PeriodicPolygon, ClosedPolygon }
enum BoundaryPosition { AtBeginning, AtEnd }
enum BoundaryCondition { Clamped1, Clamped2, Clamped3, LinearRunout }
Boundary condition.
π« Detailed Description π«
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.
π Constructor & Destructor Documentation π
π§ 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.
π§ QwtSplineCubic::~QwtSplineCubic () [virtual]
Destructor.
Definition at line 979 of file qwt_spline_cubic.cpp.
π Member Function Documentation π
π QVector< QLineF > QwtSplineCubic::bezierControlLines (const QPolygonF & points) const [override], [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.
Parameters
pointsβ Control points
Returns
- Control points of the interpolating Bezier curves
Note The implementation simply calls QwtSplineC1::bezierControlLines()
Reimplemented from QwtSplineC2.
Definition at line 1149 of file qwt_spline_cubic.cpp.
π QVector< double > QwtSplineCubic::curvatures (const QPolygonF & points) const [override], [virtual]
Find the second derivative at the control points.
Parameters
pointsβ Control nodes of the spline
Returns
- Vector with the values of the 2nd derivate at the control points
See also
slopes()
Note The x coordinates need to be increasing or decreasing
Implements QwtSplineC2.
Definition at line 1078 of file qwt_spline_cubic.cpp.
π uint QwtSplineCubic::locality () const [override], [virtual]
A cubic spline is non local, where changing one point has em effect on all polynomials.
Returns
- 0
Reimplemented from QwtSpline.
Definition at line 989 of file qwt_spline_cubic.cpp.
π QPainterPath QwtSplineCubic::painterPath (const QPolygonF & points) const [override], [virtual]
Interpolate a curve with Bezier curves. Interpolates a polygon piecewise with cubic Bezier curves and returns them as QPainterPath.
Parameters
pointsβ Control points
Returns
- Painter path, that can be rendered by
QPainter
Note The implementation simply calls QwtSplineC1::painterPath()
Reimplemented from QwtSplineC2.
Definition at line 1130 of file qwt_spline_cubic.cpp.
π QVector< QwtSplinePolynomial > QwtSplineCubic::polynomials (const QPolygonF & points) const [override], [virtual]
Calculate the interpolating polynomials for a non parametric spline.
Parameters
pointsβ Control points
Returns
- Interpolating polynomials
Note The x coordinates need to be increasing or decreasing
The implementation simply calls QwtSplineC2::polynomials(), but is intended to be replaced by a one pass calculation some day.
Reimplemented from QwtSplineC2.
Definition at line 1167 of file qwt_spline_cubic.cpp.
π QVector< double > QwtSplineCubic::slopes (const QPolygonF & points) const [override], [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.
Parameters
pointsβ Control nodes of the spline
Returns
- Vector with the values of the 2nd derivate at the control points
See also
curvatures(),QwtSplinePolynomial::fromCurvatures()
Note The x coordinates need to be increasing or decreasing
Reimplemented from QwtSplineC2.
Definition at line 1006 of file qwt_spline_cubic.cpp.
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code.
okay that is the whole vibe, bestie: source/version is Qwt User's Guide, the page is QwtSplineCubic(3), and the footer date is not printed on this page, so I am not inventing one β periodt πβ¨
π¦ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms