Hi all
I draw a simple x=y curve and the curve is not smooth.
so i use :
but if there is more than 100 points in the curve it's not smooth :(
How can i do to obtain a smooth curve ?
thank to all ;)
Printable View
Hi all
I draw a simple x=y curve and the curve is not smooth.
so i use :
but if there is more than 100 points in the curve it's not smooth :(
How can i do to obtain a smooth curve ?
thank to all ;)
You can try to use a QwtCurveFitter:
a) QwtSplineCurveFitter
Spline interpolation avoids edges, when you don't have enough points.
b) QwtWeedingCurveFitter
This is an implementation of the Douglas-Peucker algorithm. In opposite to spline interpolation it decreases the number of points.
I guess QwtWeedingCurveFitter is what you are looking for. Unfortunately this is a new class you find in Qwt SVN trunk only. But AFAIR the class is compatible with Qwt 5.2. So you can copy it into your code - or add it to your 5.2 package.
Code:
QwtWeedingCurveFitter *fitter = new QwtWeedingCurveFitter(); fitter->setTolerance(...); curve->setCurveFitter(fitter);
Uwe
thank you Uwe
i must not modify points of the curves
it is better with orthonormal axes but i don't want it.