简化三次贝塞尔路径? [英] Simplifying a cubic bezier path?

查看:150
本文介绍了简化三次贝塞尔路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现的东西接近到什么Adobe Illustrator中不使用画笔工具。它正确地分析和简化了路径,包括它的贝赛尔手柄。我实现了<一href="http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm">Ramer–Douglas–Peucker_algorithm然而,彼时实际上不是我所需要的。它非常适用于线段,但在贝赛尔手柄并不因素。是否有一个算法,能做到这样的算法,但考虑到三次Bezier手柄?与这一个问题是一个曲线可以以一角度,但该算法只看到一条直线。

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.

感谢

推荐答案

您可能想探索最小二乘法拟合贝塞尔曲线。这里是一个线程和的一个PDF 。我几年前做了这样的事情,可能会有帮助,发现的<一个href="http://www.amazon.com/Gerald-E.-Farin/e/B001H9PIUK/ref=sr_ntt_srch_lnk_1?_encoding=UTF8&qid=1282063242&sr=8-1"相对=nofollow>杰拉尔德·法林的图书有益的,但​​我不记得是哪一个。

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.

这篇关于简化三次贝塞尔路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆