Classes | Public Member Functions | Private Attributes
QwtSplineCubic Class Reference

A cubic spline. More...

#include <qwt_spline_cubic.h>

Inheritance diagram for QwtSplineCubic:
Inheritance graph
[legend]

List of all members.

Classes

class  PrivateData

Public Member Functions

virtual QVector< QLineF > bezierControlLines (const QPolygonF &points) const
 Interpolate a curve with Bezier curves.
virtual QVector< double > curvatures (const QPolygonF &) const
 Find the second derivative at the control points.
virtual uint locality () const
virtual QPainterPath painterPath (const QPolygonF &) const
 Interpolate a curve with Bezier curves.
virtual QVector
< QwtSplinePolynomial
polynomials (const QPolygonF &) const
 Calculate the interpolating polynomials for a non parametric spline.
 QwtSplineCubic ()
 Constructor The default setting is a non closing natural spline with no parametrization.
virtual QVector< double > slopes (const QPolygonF &) const
 Find the first derivative at the control points.
virtual ~QwtSplineCubic ()
 Destructor.

Private Attributes

PrivateDatad_data

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.

Todo:
The implementation is not numerical stable

Definition at line 33 of file qwt_spline_cubic.h.


Constructor & Destructor Documentation

Constructor The default setting is a non closing natural spline with no parametrization.

Definition at line 965 of file qwt_spline_cubic.cpp.

Destructor.

Definition at line 979 of file qwt_spline_cubic.cpp.


Member Function Documentation

QVector< QLineF > QwtSplineCubic::bezierControlLines ( const QPolygonF &  points) const [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:
pointsControl points
Returns:
Control points of the interpolating Bezier curves
Note:
The implementation simply calls QwtSplineC1::bezierControlLines()

Reimplemented from QwtSplineC2.

Definition at line 1150 of file qwt_spline_cubic.cpp.

QVector< double > QwtSplineCubic::curvatures ( const QPolygonF &  points) const [virtual]

Find the second derivative at the control points.

Parameters:
pointsControl 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 1079 of file qwt_spline_cubic.cpp.

uint QwtSplineCubic::locality ( ) const [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 990 of file qwt_spline_cubic.cpp.

QPainterPath QwtSplineCubic::painterPath ( const QPolygonF &  points) const [virtual]

Interpolate a curve with Bezier curves.

Interpolates a polygon piecewise with cubic Bezier curves and returns them as QPainterPath.

Parameters:
pointsControl points
Returns:
Painter path, that can be rendered by QPainter
Note:
The implementation simply calls QwtSplineC1::painterPath()

Reimplemented from QwtSplineC2.

Definition at line 1131 of file qwt_spline_cubic.cpp.

QVector< QwtSplinePolynomial > QwtSplineCubic::polynomials ( const QPolygonF &  points) const [virtual]

Calculate the interpolating polynomials for a non parametric spline.

Parameters:
pointsControl 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 1168 of file qwt_spline_cubic.cpp.

QVector< double > QwtSplineCubic::slopes ( const QPolygonF &  points) const [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:
pointsControl 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 1007 of file qwt_spline_cubic.cpp.


Member Data Documentation

Reimplemented from QwtSpline.

Definition at line 50 of file qwt_spline_cubic.h.


The documentation for this class was generated from the following files:


plotjuggler
Author(s): Davide Faconti
autogenerated on Fri Sep 1 2017 02:41:58