"Smoothing" out a PolyLine?
-
I normally Google for this kind of stuff, but I'm not sure of the proper name / terminology since I'm not really a math guy, so I'm not coming up with any hits... I'm trying to draw a very simple "graph". 0,0 10,10 20,3 30,15, etc. So, right now, I just add the points to a PolyLine and all is good. But this results in a sharp zig-zag line... how do I make it into a "smoother" "wave" type line based on the same point array? The only term I remember from math class is bezier curves lol, but that doesn't seem to be what I'm looking for.
-
I normally Google for this kind of stuff, but I'm not sure of the proper name / terminology since I'm not really a math guy, so I'm not coming up with any hits... I'm trying to draw a very simple "graph". 0,0 10,10 20,3 30,15, etc. So, right now, I just add the points to a PolyLine and all is good. But this results in a sharp zig-zag line... how do I make it into a "smoother" "wave" type line based on the same point array? The only term I remember from math class is bezier curves lol, but that doesn't seem to be what I'm looking for.
-
Try looking for Spline interpolation. Basically you're looking for a continuous function or a set of functions able to interpolate the points and retain continuity. So yes, splines are the way to go!
Seems like there are a bunch of different spline types. Am I looking for the cannonical spline?
-
Seems like there are a bunch of different spline types. Am I looking for the cannonical spline?
-
Cubic splines are a good balance between continuity and computation speed, but B-splines can be good too.
Hmm... I found some Petzold code that creates a canonical spline in WPF, seems like its working (doing what I want) unless I don't know what I'm talking about which is entirely possible since I don't know the diffs between all those splines haha. All I know is that it looks like a wave interpertation of my zig-zag line. Thanks!