QwtSplineLocal(3)
QwtSplineLocal π
From the Library Functions Manual β thatβs the manual name, folded in right here because weβre cute like that. This page is about QwtSplineLocal, bestie: a spline with C1 continuity. β¨
β¨ NAME β¨
QwtSplineLocal β a spline with C1 continuity.
π SYNOPSIS π
#include <qwt_spline_local.h>
Inherits QwtSplineC1.
π«Ά Public Types π«Ά
enum Type { Cardinal, ParabolicBlending, Akima, PChip }
Spline interpolation type.
π Public Types inherited from QwtSpline π
enum BoundaryType { ConditionalBoundaries, PeriodicPolygon, ClosedPolygon }enum BoundaryPosition { AtBeginning, AtEnd }enum BoundaryCondition { Clamped1, Clamped2, Clamped3, LinearRunout }β boundary condition.
πΈ Public Member Functions πΈ
QwtSplineLocal (Type type)β Constructor.virtual ~QwtSplineLocal ()β Destructor.Type type () constvirtual uint locality () const overridevirtual QPainterPath painterPath (const QPolygonF &) const overrideβ Interpolate a curve with Bezier curves.virtual QVector< QLineF > bezierControlLines (const QPolygonF &) 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.
π¦ Public Member Functions inherited from QwtSplineC1 π¦
QwtSplineC1 ()β Constructor.virtual ~QwtSplineC1 ()β Destructor.virtual QPolygonF equidistantPolygon (const QPolygonF &, double distance, bool withNodes) const overrideβ Find an interpolated polygon withequidistant"points.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.
π« Detailed Description π«
A spline with C1 continuity.
QwtSplineLocal offers several standard algorithms for interpolating a curve with polynomials having C1 continuity at the control points. All algorithms are local in a sense, that changing one control point only few polynomials.
Definition at line 24 of file qwt_spline_local.h.
π₯ Member Enumeration Documentation π₯
enum QwtSplineLocal::Type
Spline interpolation type. All type of spline interpolations are lightweight algorithms calculating the slopes at a point by looking 1 or 2 points back and ahead.
Enumerator:
Cardinalβ A cardinal spline. The cardinal spline interpolation is a very cheap calculation with a locality of 1.ParabolicBlendingβ Parabolic blending is a cheap calculation with a locality of 1. Sometimes it is also called Cubic Bessel interpolation.Akimaβ The algorithm of H.Akima is a calculation with a locality of 2.PChipβ Piecewise Cubic Hermite Interpolating Polynomial (PCHIP) is an algorithm that is popular because of being offered by MATLAB. It preserves the shape of the data and respects monotonicity. It has a locality of 1.
Definition at line 34 of file qwt_spline_local.h.
π Constructor & Destructor Documentation π
QwtSplineLocal::QwtSplineLocal (Type type)
Constructor.
- Parameters
typeβ Spline type, specifying the type of interpolation
- See also
type()
Definition at line 450 of file qwt_spline_local.cpp.
QwtSplineLocal::~QwtSplineLocal () [virtual]
Destructor.
Definition at line 461 of file qwt_spline_local.cpp.
π Member Function Documentation π
QVector< QLineF > QwtSplineLocal::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
Reimplemented from QwtSplineC1.
Definition at line 502 of file qwt_spline_local.cpp.
uint QwtSplineLocal::locality () const [override], [virtual]
The locality of an spline interpolation identifies how many adjacent polynomials are affected, when changing the position of one point.
The Cardinal, ParabolicBlending and PChip algorithms have a locality of 1, while the Akima interpolation has a locality of 2.
- Returns
1or2
Reimplemented from QwtSpline.
Definition at line 552 of file qwt_spline_local.cpp.
QPainterPath QwtSplineLocal::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
- Painter path, that can be rendered by
Reimplemented from QwtSplineC1.
Definition at line 482 of file qwt_spline_local.cpp.
QVector< QwtSplinePolynomial > QwtSplineLocal::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
QwtSplineC1::polynomials(), but is intended to be replaced by a one pass calculation some day.
Reimplemented from QwtSplineC1.
Definition at line 537 of file qwt_spline_local.cpp.
QVector< double > QwtSplineLocal::slopes (const QPolygonF & points) const [override], [virtual]
Find the first 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
- Note
- The x coordinates need to be increasing or decreasing
Implements QwtSplineC1.
Definition at line 521 of file qwt_spline_local.cpp.
QwtSplineLocal::Type QwtSplineLocal::type () const
- Returns
- Spline type, specifying the type of interpolation
Definition at line 468 of file qwt_spline_local.cpp.
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Cute sign-off: source/version/page vibes are Qwt User's Guide + QwtSplineLocal(3); no separate date was printed in the original footer, bestie. Stay spliney! πβ¨
π¦ 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