QwtSpline(3)
π QwtSpline(3) β Library Functions Manual, bestie edition π
Okay so weβre in the Library Functions Manual, and this is the page for QwtSpline(3) β literally the base-class era for all splines. No cap, itβs giving foundational.
πΈ NAME πΈ
QwtSpline β Base class for all splines.
β¨ SYNOPSIS β¨
#include <qwt_spline.h>
Inherited by QwtSplineBasis, and QwtSplineInterpolating.
π Public Types π
enum BoundaryType { ConditionalBoundaries, PeriodicPolygon, ClosedPolygon }enum BoundaryPosition { AtBeginning, AtEnd }enum BoundaryCondition { Clamped1, Clamped2, Clamped3, LinearRunout }β Boundary condition.
π Public Member Functions π
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.virtual QPolygonF polygon (const QPolygonF &, double tolerance) constβ Interpolate a curve by a polygon.virtual QPainterPath painterPath (const QPolygonF &) const =0virtual uint locality () const
π₯ Detailed Description π₯
Base class for all splines.
A spline is a curve represented by a sequence of polynomials. Spline approximation is the process of finding polynomials for a given set of points. When the algorithm preserves the initial points it is called interpolating.
Splines can be classified according to conditions of the polynomials that are met at the start/endpoints of the pieces:
- Geometric Continuity
- G0: polynomials are joined
- G1: first derivatives are proportional at the join point The curve tangents thus have the same direction, but not necessarily the same magnitude. i.e.,
C1'(1) = (a,b,c)andC2'(0) = (k*a, k*b, k*c). - G2: first and second derivatives are proportional at join point
- Parametric Continuity
- C0: curves are joined
- C1: first derivatives equal
- C2: first and second derivatives are equal
Geometric continuity requires the geometry to be continuous, while parametric continuity requires that the underlying parameterization be continuous as well. Parametric continuity of order n implies geometric continuity of order n, but not vice-versa.
QwtSpline is the base class for spline approximations of any continuity.
Definition at line 57 of file qwt_spline.h.
π Member Enumeration Documentation π
π§ enum QwtSpline::BoundaryCondition
Boundary condition. A spline algorithm calculates polynomials by looking a couple of points back/ahead (locality()). At the ends additional rules are necessary to compensate the missing points.
See also boundaryCondition(), boundaryValue(), and QwtSplineC2::BoundaryConditionC2.
Enumerator:
Clamped1β The first derivative at the end point is given- See also
boundaryValue()
- See also
Clamped2β The second derivative at the end point is given- See also
boundaryValue()
- See also
Note: a condition having a second derivative of 0 is also called "natural".
Clamped3β The third derivative at the end point is given- See also
boundaryValue()
- See also
Note: a condition having a third derivative of 0 is also called "parabolic runout".
LinearRunoutβ The first derivate at the endpoint is related to the first derivative at its neighbour by the boundary value. F,e when the boundary value at the end is 1.0 then the slope at the last 2 points is the same.- See also
boundaryValue().
- See also
Definition at line 119 of file qwt_spline.h.
π¦ enum QwtSpline::BoundaryPosition
position of a boundary condition
See also boundaryCondition(), boundaryValue().
Enumerator:
AtBeginningβ the condition is at the beginning of the polynomialAtEndβ the condition is at the end of the polynomial
Definition at line 99 of file qwt_spline.h.
π enum QwtSpline::BoundaryType
Boundary type specifying the spline at its endpoints
See also setBoundaryType(), boundaryType().
Enumerator:
ConditionalBoundariesβ The polynomials at the start/endpoint depend on specific conditions- See also
QwtSpline::BoundaryCondition
- See also
PeriodicPolygonβ The polynomials at the start/endpoint are found by using imaginary additional points. Additional points at the end are found by translating points from the beginning or v.v.ClosedPolygonβ ClosedPolygon is similar to PeriodicPolygon beside, that the interpolation includes the connection between the last and the first control point.
Note: Only works for parametrizations, where the parameter increment for the the final closing line is positive. This excludesQwtSplineParametrization::ParameterXandQwtSplineParametrization::ParameterY
Definition at line 65 of file qwt_spline.h.
π«Ά Constructor & Destructor Documentation π«Ά
π QwtSpline::QwtSpline ()
Constructor. The default setting is a non closing spline with chordal parametrization
See also setParametrization(), setBoundaryType().
Definition at line 540 of file qwt_spline.cpp.
π QwtSpline::~QwtSpline () [virtual]
Destructor.
Definition at line 546 of file qwt_spline.cpp.
π MEMBER FUNCTION DOCUMENTATION π
Okay bestie, this is the member-function zone, and we are going through every single one. No skipping, no "eh, close enough." Periodt.
π int QwtSpline::boundaryCondition (BoundaryPosition position) const
- Returns: Condition for an endpoint of the spline.
- Parameters:
positionβ At the beginning or the end of the spline.
- See also:
setBoundaryCondition(),boundaryValue(),setBoundaryConditions().
Definition at line 651 of file qwt_spline.cpp.
π¦ QwtSpline::BoundaryType QwtSpline::boundaryType () const
- Returns: Boundary type.
- See also:
setBoundaryType().
Definition at line 626 of file qwt_spline.cpp.
πΈ double QwtSpline::boundaryValue (BoundaryPosition position) const
- Returns: Boundary value.
- Parameters:
positionβ At the beginning or the end of the spline.
- See also:
setBoundaryValue(),boundaryCondition().
Definition at line 682 of file qwt_spline.cpp.
π§ uint QwtSpline::locality () const [virtual]
So the locality of a spline interpolation identifies how many adjacent polynomials are affected when you change the position of one point. That's the whole vibe check.
A locality of 'n' means that changing the coordinates of a point has an effect on 'n' leading and 'n' following polynomials. Those polynomials can be calculated from a local subpolygon.
A value of 0 means that the interpolation is not local, and any modification of the polygon requires recalculating all polynomials (f.e cubic splines). That's the high-key expensive one, bestie.
- Returns: Order of locality.
Reimplemented in QwtSplineBasis, QwtSplineCubic, QwtSplineLocal, and QwtSplinePleasing.
Definition at line 564 of file qwt_spline.cpp.
π₯ virtual QPainterPath QwtSpline::painterPath (const QPolygonF & points) const [pure virtual]
Approximates a polygon piecewise with cubic Bezier curves and returns them as QPainterPath. It's giving very "draw me like one of your French curves."
- Parameters:
pointsβ Control points.
- Returns: Painter path, that can be rendered by
QPainter. - See also:
polygon(),QwtBezier.
Implemented in QwtSplineBasis, QwtSplineC1, QwtSplineC2, QwtSplineCubic, QwtSplineInterpolating, QwtSplineLocal, and QwtSplinePleasing.
π const QwtSplineParametrization * QwtSpline::parametrization () const
- Returns: parametrization.
- See also:
setParametrization().
Definition at line 605 of file qwt_spline.cpp.
π QPolygonF QwtSpline::polygon (const QPolygonF & points, double tolerance) const [virtual]
Interpolate a curve by a polygon. Interpolates a polygon piecewise with Bezier curves interpolating them in a 2nd pass by polygons. Two-pass behavior, very main character.
The interpolation is based on "Piecewise Linear Approximation of BΓ©zier Curves" by Roger Willcocks (( http://www.rops.org )).
- Parameters:
pointsβ Control points.toleranceβ Maximum for the accepted error of the approximation.
- Returns: polygon approximating the interpolating polynomials.
- See also:
bezierControlLines(),QwtBezier.
Reimplemented in QwtSplineInterpolating.
Definition at line 496 of file qwt_spline.cpp.
π void QwtSpline::setBoundaryCondition (BoundaryPosition position, int condition)
Define the condition for an endpoint of the spline. Setting the boundary condition, but make it fashion.
- Parameters:
positionβ At the beginning or the end of the spline.conditionβ Condition.
- See also:
BoundaryCondition,QwtSplineC2::BoundaryCondition,boundaryCondition().
Definition at line 639 of file qwt_spline.cpp.
β¨ void QwtSpline::setBoundaryConditions (int condition, double valueBegin = 0.0, double valueEnd = 0.0)
Define the condition at the endpoints of a spline. Both ends getting their little boundary moment.
- Parameters:
conditionβ Condition.valueBeginβ Used for the condition at the beginning of the spline.valueEndβ Used for the condition at the end of the spline.
- See also:
BoundaryCondition,QwtSplineC2::BoundaryCondition,testBoundaryCondition(),setBoundaryValue().
Definition at line 700 of file qwt_spline.cpp.
π void QwtSpline::setBoundaryType (BoundaryType boundaryType)
Define the boundary type for the endpoints of the approximating spline.
- Parameters:
boundaryTypeβ Boundary type.
- See also:
boundaryType().
Definition at line 617 of file qwt_spline.cpp.
π void QwtSpline::setBoundaryValue (BoundaryPosition position, double value)
Define the boundary value. The boundary value is an parameter used in combination with the boundary condition. Its meaning depends on the condition. So yes, it's a "depends on the situation" situation.
- Parameters:
positionβ At the beginning or the end of the spline.valueβ Value used for the condition at the end point.
- See also:
boundaryValue(),setBoundaryCondition().
Definition at line 670 of file qwt_spline.cpp.
π¦ void QwtSpline::setParametrization (int type)
Define the parametrization for a parametric spline approximation. The default setting is a chordal parametrization. Defaults, but make it cute.
- Parameters:
typeβ Type of parametrization, usually one ofQwtSplineParametrization::Type.
- See also:
parametrization().
Definition at line 576 of file qwt_spline.cpp.
π¦ void QwtSpline::setParametrization (QwtSplineParametrization * parametrization)
Define the parametrization for a parametric spline approximation. The default setting is a chordal parametrization. Same energy, pointer edition.
- Parameters:
parametrizationβ Parametrization.
- See also:
parametrization().
Definition at line 592 of file qwt_spline.cpp.
π AUTHOR π
Generated automatically by Doxygen for Qwt User's Guide from the source code.
And that's the whole page, bestie β Qwt User's Guide / QwtSpline(3) footer energy, source/version + date and all. Byeee πππ
π¦ 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