QwtSplineC2(3)
β¨ QwtSplineC2 β¨ β Library Functions Manual edition
okay so bestie, you're in the Library Functions Manual and this is the page for QwtSplineC2. It's giving base-class energy for spline interpolations that have second order parametric continuity (C2) between adjoining curves. periodt π
πΈ NAME πΈ
QwtSplineC2 β Base class for spline interpolations providing a second order parametric continuity (C2) between adjoining curves.
π¦ SYNOPSIS π¦
#include <qwt_spline.h>
Inherits QwtSplineC1.
Inherited by QwtSplineCubic.
π Public Types π
enum BoundaryConditionC2 { CubicRunout = LinearRunout + 1, NotAKnot }β the C2 boundary-condition enum, slay.
π 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 π
QwtSplineC2 ()β Constructor.virtual ~QwtSplineC2 ()β Destructor.virtual 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 QPolygonF equidistantPolygon (const QPolygonF &, double distance, bool withNodes) const overrideβ Find an interpolated polygon with "equidistant" points.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 =0β Find the second derivative at the control 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.virtual uint locality () const
π Detailed Description π
Base class for spline interpolations providing a second order parametric continuity (C2) between adjoining curves.
All interpolations with C2 continuity are based on rules for finding the 2. derivate at some control points.
In case of non parametric splines those points are the curve points, while for parametric splines the calculation is done twice using a parameter value t.
See also: QwtSplineParametrization
Definition at line 267 of file qwt_spline.h.
π§ Member Enumeration Documentation π§
enum QwtSplineC2::BoundaryConditionC2
Boundary condition that requires C2 continuity.
See also: QwtSpline::boundaryCondition, QwtSpline::BoundaryCondition
Enumerator
CubicRunoutβ The second derivate at the endpoint is related to the second derivatives at the2neighbours:cv[0] := 2.0 * cv[1] - cv[2].
Note: boundaryValue() is ignored
NotAKnotβ The 3rd derivate at the endpoint matches the 3rd derivate at its neighbours. Or in other words: the first/last curve segment extents the polynomial of its neighboured polynomial.
Note: boundaryValue() is ignored
Definition at line 275 of file qwt_spline.h.
π Constructor & Destructor Documentation π
QwtSplineC2::QwtSplineC2 ()
Constructor. The default setting is a non closing spline with no parametrization (QwtSplineParametrization::ParameterX).
See also: QwtSpline::setParametrization(), QwtSpline::setBoundaryType()
Definition at line 1228 of file qwt_spline.cpp.
QwtSplineC2::~QwtSplineC2 () [virtual]
Destructor.
Definition at line 1233 of file qwt_spline.cpp.
π Member Function Documentation π
QVector< QLineF > QwtSplineC2::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(), but is intended to be replaced by a more efficient implementation that builds the polynomials by the curvatures some day.
Reimplemented from: QwtSplineC1.
Reimplemented in: QwtSplineCubic.
Definition at line 1270 of file qwt_spline.cpp.
virtual QVector< double > QwtSplineC2::curvatures (const QPolygonF & points) const [pure 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
Implemented in: QwtSplineCubic.
QPolygonF QwtSplineC2::equidistantPolygon (const QPolygonF & points, double distance, bool withNodes) const [override], [virtual]
Find an interpolated polygon with "equidistant" points. The implementation is optimzed for non parametric curves (QwtSplineParametrization::ParameterX) and falls back to QwtSpline::equidistantPolygon() otherwise.
Parameters
pointsβ Control nodes of the splinedistanceβ Distance between2points according to the parametrizationwithNodesβ When true, also add the control nodes (even if not being equidistant)
Returns
- Interpolating polygon
See also: QwtSpline::equidistantPolygon()
Reimplemented from: QwtSplineC1.
Definition at line 1295 of file qwt_spline.cpp.
QPainterPath QwtSplineC2::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(), but is intended to be replaced by a one pass calculation some day.
Reimplemented from: QwtSplineC1.
Reimplemented in: QwtSplineCubic.
Definition at line 1249 of file qwt_spline.cpp.
QVector< QwtSplinePolynomial > QwtSplineC2::polynomials (const QPolygonF & points) const [override], [virtual]
Calculate the interpolating polynomials for a non parametric spline. C2 spline interpolations are based on finding values for the second derivates of f at the control points. The interpolating polynomials can be calculated from the the second derivates using QwtSplinePolynomial::fromCurvatures.
The default implementation is a 2 pass calculation. In derived classes it might be overloaded by a one pass implementation.
Parameters
pointsβ Control points
Returns
- Interpolating polynomials
Note: The x coordinates need to be increasing or decreasing
Reimplemented from: QwtSplineC1.
Reimplemented in: QwtSplineCubic.
Definition at line 1381 of file qwt_spline.cpp.
QVector< double > QwtSplineC2::slopes (const QPolygonF & points) const [override], [virtual]
Find the first derivative at the control points. An implementation calculating the 2nd derivatives and then building the slopes in a 2nd loop. QwtSplineCubic overloads it with a more performant implementation doing it in one loop.
Parameters
pointsβ Control nodes of the spline
Returns
- Vector with the values of the 1nd derivate at the control points
See also: curvatures()
Note: The x coordinates need to be increasing or decreasing
Implements: QwtSplineC1.
Reimplemented in: QwtSplineCubic.
Definition at line 1339 of file qwt_spline.cpp.
β Author β
Generated automatically by Doxygen for Qwt User's Guide from the source code.
okay bye bestie π«Ά β generated automatically by Doxygen for Qwt User's Guide from the source code; the footer stan card says QwtSplineC2(3) and no date was listed, so we're not inventing one. slay and hydrate π β¨
π¦ 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