0 Replies Latest reply on Jan 8, 2009 10:26 AM by Rothrock

    Math Help: Smooth curve through 2D points

    Rothrock Level 5
      Okay so I'm working on understanding blob detection. I've used the Marching Square algorithm on a bitmap to find the edge pixels of the shapes. But when I string those together and draw it I get a very jaggy stair step shape.

      So I'm wondering how to take a set of 2D points that describe a closed curve and use that data to generate a smooth(er) curve that could then be stored and used for various purposes.

      I found this sample code but it seems to be for Cubic Bezier curves and Flash uses Quadratic Bezier curves. And when you combine my C# knowledge with my math kung-fu I come up very short of being able to understand it and convert it to actionscript. (Plus I'm not even sure it works for closed paths?)

      So if anybody (and I guess that really means Kglad) has any understanding or pointers that would be great.