PDA

View Full Version : drawing smooth curve to a set of points - without qwt



szisziszilvi
24th January 2011, 08:51
Hi,

after some previous tries the purpose would be now to draw a "nice" line onto a selecton of points. I'm using
- QGraphicsview
- class derived from QGrapichsItem with reimplementing the paint function

I tried a class using the QPainterpath with its "quadTo" function and gives relative nice - or at least satisfying - result for "a lot of points", but if there is just "some" points given, the straight lines doesn't really look pretty. Of course there is still a possibility to calculate some additional points with some statistical methods, wich can work very nice, but I was wondering if there was another, simplier way to reach the goal. The cubicTo is still not the best, because 1st I can add oly 3 points and not a set of points, and 2nd it does not necessarily reach the control point, and furthermore it is still a bit hard to avoid "braking points" at the connection of the triplets.

Yes, I know qwt could make my life easier, but I failed when I tried to install that environment, so I started to find another way. (Or this could be nice if someone could offer me a real-time online help for the building of qwt on any chat device... stop dreaming? :) )