views:

89

answers:

1

I'm trying to achieve something close to what Adobe Illustrator does with the brush tool. It correctly analyzes and simplifies the path, including its bezier handles. I implemented the Ramer–Douglas–Peucker_algorithm however, it wound up not really being what I needed. It works very well for line segments, but doesn't factor in bezier handles. Is there an algorithm that can do like this algorithm, but take into consideration cubic bezier handles? The problem with this one is that a curve could be at an angle but the algorithm only sees a straight line.

Thanks

+1  A: 

You probably want to explore least squares fitting for Bezier curves. Here's one thread and a pdf that may be helpful.. I did this sort of thing several years ago, and found one of Gerald Farin's books helpful, but I can't remember which one.

brainjam