[置顶] QwtSplineCurveFitter Class Reference

Detailed Description

A curve fitter using cubic splines.

QwtSplineCurveFitter 是产生立体样条的曲线效果。(翻译不精确。。。反正和立体效果有关),感觉没什么大用。

在示例程序中,curvdemo2中,好像不起什么作用,我认为它只是改变了将点连起来的线条样式。


Auto 

Use the default spline algorithm for polygons with increasing x values ( p[i-1] < p[i] ), otherwise use a parametric spline algorithm.

Spline 

Use a default spline algorithm.

ParametricSpline 

Use a parametric spline algorithm.


curve[i]是一个线条

curveFitter = new QwtSplineCurveFitter();
    curveFitter->setFitMode(QwtSplineCurveFitter::Spline);//两点用折线
    curveFitter->setSplineSize(150);
    curve[i].setCurveFitter(curveFitter);
 
  

curveFitter = new QwtSplineCurveFitter();
    curveFitter->setFitMode(QwtSplineCurveFitter::ParametricSpline );// 生成参数样条曲线
    curveFitter->setSplineSize(150);

curveFitter = new QwtSplineCurveFitter();
    curveFitter->setFitMode(QwtSplineCurveFitter::Auto );
    curveFitter->setSplineSize(150);

polygons  多边形

你可能感兴趣的:(Algorithm,Class,reference)