Search code examples
c#curve

algorithm to smooth curve


I have a curve with a lot of points, resulting in a slowing down at GUI level. I would like to apply an algorithm which remove adjacent points which are too close of each other (in term of values, and so can be considered useless)

Is there any famous algorithm to do this ? I'm using C# and ZedGraph


Solution

  • You can use Douglas-Peucker algorithm to reduce number of points and save the curve shape. C# implementation can be found here