QwtSplineC1(3)
π QwtSplineC1(3) π
okay bestie, welcome to the Library Functions Manual β this page is QwtSplineC1(3) and itβs giving βbase class for spline interpolationsβ main character energy, but weβre gonna make it make sense, fr fr. π
πΈ NAME πΈ
QwtSplineC1 β base class for spline interpolations providing a first order parametric continuity ( C1 ) between adjoining curves.
β¨ SYNOPSIS β¨
#include <qwt_spline.h>
Inherits QwtSplineG1.
Inherited by QwtSplineC2, and QwtSplineLocal.
π«Ά Public Member Functions
QwtSplineC1 ()β Constructor.virtual ~QwtSplineC1 ()β Destructor.virtual QPainterPath painterPath (const QPolygonF &) const overrideβ calculate an interpolated painter path.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β calculate the interpolating polynomials for a non parametric spline.virtual QVector< double > slopes (const QPolygonF &) const =0β find the first derivative at the control points.virtual double slopeAtBeginning (const QPolygonF &, double slopeNext) constβ (the page only gives the signature here, bestie π«Ά)virtual double slopeAtEnd (const QPolygonF &, double slopeBefore) constβ (same situation: signature only on the page β¨)
π§ 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)β (no extra one-liner on the page)void setParametrization (QwtSplineParametrization *)β (no extra one-liner on the page)const QwtSplineParametrization * parametrization () constβ (no extra one-liner on the page)void setBoundaryType (BoundaryType)β (no extra one-liner on the page)BoundaryType boundaryType () constβ (no extra one-liner on the page)void setBoundaryValue (BoundaryPosition, double value)β Define the boundary value.double boundaryValue (BoundaryPosition) constβ (no extra one-liner on the page)void setBoundaryCondition (BoundaryPosition, int condition)β Define the condition for an endpoint of the spline.int boundaryCondition (BoundaryPosition) constβ (no extra one-liner on the page)void setBoundaryConditions (int condition, double valueBegin=0.0, double valueEnd=0.0)β Define the condition at the endpoints of a spline.virtual uint locality () constβ (no extra one-liner on the page)
π¦ Additional Inherited Members
Public Types inherited from QwtSpline
enum BoundaryType { ConditionalBoundaries, PeriodicPolygon, ClosedPolygon }enum BoundaryPosition { AtBeginning, AtEnd }enum BoundaryCondition { Clamped1, Clamped2, Clamped3, LinearRunout }β Boundary condition.
π Detailed Description π
QwtSplineC1 is the base class for spline interpolations providing a first order parametric continuity ( C1 ) between adjoining curves. Slay.
All interpolations with C1 continuity are based on rules for finding the 1. derivate at some control points. (Yes, the page says βderivateβ β Iβm just reporting the vibes π.)
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 235 of file qwt_spline.h.
π Constructor & Destructor Documentation π
QwtSplineC1::QwtSplineC1 ()
Constructor vibes: by default you get a non closing spline with no parametrization ( QwtSplineParametrization::ParameterX ).
See also: QwtSpline::setParametrization(), QwtSpline::setBoundaryType()
Definition at line 962 of file qwt_spline.cpp.
QwtSplineC1::~QwtSplineC1 () [virtual]
Destructor.
Definition at line 968 of file qwt_spline.cpp.
π₯ Member Function Documentation π₯
QVector< QLineF > QwtSplineC1::bezierControlLines (const QPolygonF & points) const [override], [virtual]
This is the Bezier-curve interpolation moment: it interpolates a polygon piecewise with cubic Bezier curves and gives you the 2 control points of each curve as a QLineF.
Parameters
- points β Control points
Returns Control points of the interpolating Bezier curves
Implements: QwtSplineInterpolating
Reimplemented in: QwtSplineC2, QwtSplineCubic, and QwtSplineLocal.
Definition at line 1101 of file qwt_spline.cpp.
QPolygonF QwtSplineC1::equidistantPolygon (const QPolygonF & points, double distance, bool withNodes) const [override], [virtual]
This finds an interpolated polygon with "equidistant" points. The implementation is optimzed for non parametric curves ( QwtSplineParametrization::ParameterX ); otherwise it falls back to QwtSpline::equidistantPolygon().
Parameters
- points β Control nodes of the spline
- distance β Distance between 2 points according to the parametrization
- withNodes β When true, also add the control nodes ( even if not being equidistant )
Returns Interpolating polygon
See also: QwtSpline::equidistantPolygon()
Reimplemented from: QwtSplineInterpolating
Reimplemented in: QwtSplineC2
Definition at line 1167 of file qwt_spline.cpp.
QPainterPath QwtSplineC1::painterPath (const QPolygonF & points) const [override], [virtual]
This one calculates an interpolated painter path: it takes the polygon, interpolates it piecewise into cubic Bezier curves, and hands them back as a QPainterPath.
The implementation calculates the slopes at the control points and converts them into painter path elements in an additional loop.
Parameters
- points β Control points
Returns QPainterPath β painter path, that can be rendered by QPainter
Note: Derived spline classes might overloadpainterPath()to avoid the extra loops for converting results into aQPainterPath.
Reimplemented from: QwtSplineInterpolating
Reimplemented in: QwtSplineC2, QwtSplineCubic, and QwtSplineLocal.
Definition at line 1043 of file qwt_spline.cpp.
QVector< QwtSplinePolynomial > QwtSplineC1::polynomials (const QPolygonF & points) const [virtual]
Calculate the interpolating polynomials for a non parametric spline. C1 spline interpolations are based on finding values for the first derivates at the control points. The interpolating polynomials can be calculated from the the first derivates using QwtSplinePolynomial::fromSlopes().
The default implementation is a two 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 in: QwtSplineC2, QwtSplineCubic, and QwtSplineLocal.
Definition at line 1201 of file qwt_spline.cpp.
double QwtSplineC1::slopeAtBeginning (const QPolygonF & points, double slopeNext) const [virtual]
Parameters
- points β Control points
- slopeNext β Value of the first derivative at the second point
Returns value of the first derivative at the first point
See also: slopeAtEnd(), QwtSpline::boundaryCondition(), QwtSpline::boundaryValue()
Definition at line 979 of file qwt_spline.cpp.
double QwtSplineC1::slopeAtEnd (const QPolygonF & points, double slopeBefore) const [virtual]
Parameters
- points β Control points
- slopeBefore β Value of the first derivative at the point before the last one
Returns value of the first derivative at the last point
See also: slopeAtBeginning(), QwtSpline::boundaryCondition(), QwtSpline::boundaryValue()
Definition at line 997 of file qwt_spline.cpp.
virtual QVector< double > QwtSplineC1::slopes (const QPolygonF & points) const [pure 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
Implemented in: QwtSplineC2, QwtSplineCubic, and QwtSplineLocal.
π AUTHOR π
Generated automatically by Doxygen for Qwt User's Guide from the source code.
and thatβs the whole page, bestie π«Ά source/version: Qwt User's Guide, page QwtSplineC1(3), and the footer doesnβt list a date, so Iβm not making one up π β¨
π¦ 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