A cubic polynomial without constant term.
More...
#include <qwt_spline_polynomial.h>
|
static QwtSplinePolynomial | fromCurvatures (const QPointF &p1, double cv1, const QPointF &p2, double cv2) |
|
static QwtSplinePolynomial | fromCurvatures (double dx, double dy, double cv1, double cv2) |
|
static QwtSplinePolynomial | fromSlopes (const QPointF &p1, double m1, const QPointF &p2, double m2) |
|
static QwtSplinePolynomial | fromSlopes (double x, double y, double m1, double m2) |
|
|
double | c1 |
| coefficient of the linear summand More...
|
|
double | c2 |
| coefficient of the quadratic summand More...
|
|
double | c3 |
| coefficient of the cubic summand More...
|
|
A cubic polynomial without constant term.
QwtSplinePolynomial is a 3rd degree polynomial of the form: y = c3 * x³ + c2 * x² + c1 * x;
QwtSplinePolynomial is usually used in combination with polygon interpolation, where it is not necessary to store a constant term ( c0 ), as the translation is known from the corresponding polygon points.
- See also
- QwtSplineC1
Definition at line 33 of file qwt_spline_polynomial.h.
QwtSplinePolynomial::QwtSplinePolynomial |
( |
double |
a3 = 0.0 , |
|
|
double |
a2 = 0.0 , |
|
|
double |
a1 = 0.0 |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
a3 | Coefficient of the cubic summand |
a2 | Coefficient of the quadratic summand |
a1 | Coefficient of the linear summand |
Definition at line 77 of file qwt_spline_polynomial.h.
double QwtSplinePolynomial::curvatureAt |
( |
double |
x | ) |
const |
|
inline |
Calculate the value of the second derivate of a polynomial for a given x
- Parameters
-
- Returns
- Curvature at x
Definition at line 130 of file qwt_spline_polynomial.h.
QwtSplinePolynomial QwtSplinePolynomial::fromCurvatures |
( |
const QPointF & |
p1, |
|
|
double |
cv1, |
|
|
const QPointF & |
p2, |
|
|
double |
cv2 |
|
) |
| |
|
inlinestatic |
Find the coefficients for the polynomial including 2 points with specific values for the 2nd derivates at these points.
- Parameters
-
p1 | First point |
cv1 | Value of the second derivate at p1 |
p2 | Second point |
cv2 | Value of the second derivate at p2 |
- Returns
- Coefficients of the polynomials
- Note
- The missing constant term of the polynomial is p1.y()
Definition at line 185 of file qwt_spline_polynomial.h.
QwtSplinePolynomial QwtSplinePolynomial::fromCurvatures |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
cv1, |
|
|
double |
cv2 |
|
) |
| |
|
inlinestatic |
Find the coefficients for the polynomial from the offset between 2 points and specific values for the 2nd derivates at these points.
- Parameters
-
dx | X-offset |
dy | Y-offset |
cv1 | Value of the second derivate at p1 |
cv2 | Value of the second derivate at p2 |
- Returns
- Coefficients of the polynomials
Definition at line 202 of file qwt_spline_polynomial.h.
QwtSplinePolynomial QwtSplinePolynomial::fromSlopes |
( |
const QPointF & |
p1, |
|
|
double |
m1, |
|
|
const QPointF & |
p2, |
|
|
double |
m2 |
|
) |
| |
|
inlinestatic |
Find the coefficients for the polynomial including 2 points with specific values for the 1st derivates at these points.
- Parameters
-
p1 | First point |
m1 | Value of the first derivate at p1 |
p2 | Second point |
m2 | Value of the first derivate at p2 |
- Returns
- Coefficients of the polynomials
- Note
- The missing constant term of the polynomial is p1.y()
Definition at line 147 of file qwt_spline_polynomial.h.
QwtSplinePolynomial QwtSplinePolynomial::fromSlopes |
( |
double |
dx, |
|
|
double |
dy, |
|
|
double |
m1, |
|
|
double |
m2 |
|
) |
| |
|
inlinestatic |
Find the coefficients for the polynomial from the offset between 2 points and specific values for the 1st derivates at these points.
- Parameters
-
dx | X-offset |
dy | Y-offset |
m1 | Value of the first derivate at p1 |
m2 | Value of the first derivate at p2 |
- Returns
- Coefficients of the polynomials
Definition at line 164 of file qwt_spline_polynomial.h.
- Parameters
-
- Returns
- true, when the polynomials have different coefficients
Definition at line 97 of file qwt_spline_polynomial.h.
- Parameters
-
- Returns
- true, when both polynomials have the same coefficients
Definition at line 88 of file qwt_spline_polynomial.h.
double QwtSplinePolynomial::slopeAt |
( |
double |
x | ) |
const |
|
inline |
Calculate the value of the first derivate of a polynomial for a given x
- Parameters
-
- Returns
- Slope at x
Definition at line 119 of file qwt_spline_polynomial.h.
double QwtSplinePolynomial::valueAt |
( |
double |
x | ) |
const |
|
inline |
Calculate the value of a polynomial for a given x
- Parameters
-
- Returns
- Value at x
Definition at line 108 of file qwt_spline_polynomial.h.
double QwtSplinePolynomial::c1 |
double QwtSplinePolynomial::c2 |
double QwtSplinePolynomial::c3 |
The documentation for this class was generated from the following file: