View Full Version : How to draw curve between two points in qwt polar?

25th September 2008, 19:21
setting QwtPolarCurve::setStyle() to line gives me the plot showing in attached file line.gif, anybody knows how to draw curve between two points, like the plot in attached file curve.gif?

Thank you.

26th September 2008, 06:55
The code that is responsible for painting the connection lines is in QwtPolarCurve::drawLines(). You can overload and replace it in your derived class.

If you know a algo how to calculate "rounded" connection please send it ( or the code ) to me.


29th September 2008, 15:46
Uwe -

We do have some code in an old, Motif-based executable as well as an old, Openlook-based executable that does "linear" interpolation on a polar scale (which results in the "rounded connection" between points). Once we locate the source for it, we'll be happy to send it to you to include in QWT.

29th September 2008, 23:24
Please do so.


9th October 2008, 17:31
After some investigation of the legacy code we have, we determined that the solution done in the past was simply to interpolate the original set of data (in rectangular coordinates) and create a uniform data set of 700 points. Then we plot those 700 points in polar form and it makes the plot display with the appropriate "smoothed-out" curves.

We implemented this in our new code with QWT and it is an acceptable solution.

Unfortunately, we don't have a more elegant algorithm for this Uwe.

10th October 2008, 06:44
In the meantime I have added a new class QwtPolarFitter, that also simply adds a couple of equidistant points, that makes the lines "rounded". But QwtPolarCurve also allows to add more advanved algorithms by implementing an individual fitter object.

Available from SVN ( which is very close to QwtPolar 0.0.3 )