高效的线平滑(简化) [英] Efficient Line Smoothing (Simplify)

查看:173
本文介绍了高效的线平滑(简化)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建ActionScript中的绘画应用程序(虽然我的问题是没有的ActionScript相关的)。其基本思路是开始绘画时鼠标pssed和跟踪鼠标移动$ P $。我想acchieve是:

I am creating a Painting Application in Actionscript (althought my question is not Actionscript related). The basic idea is to start painting when the mouse is pressed and tracking the mouse movements. What I want to acchieve is:

  1. 降低鼠标的噪音和
  2. 创建更流畅的看线。

现在,(1)是有问题的,因为我得到成千上万的鼠标动作在几秒钟内。由于(1)该行可以关注一下锯齿。 目前什么事的想法:当用户完成绘制行,我存储所有的动作在阵,降低他们(中位数阈值),然后使用样条算法来重建一条线。

Right now, (1) is problematic because I get thousands of mouse movements within a few seconds. Due to (1) the line can look jaggy. What current idea: when the user finishes drawing the line, i store all movements in a Array and reduce them (median threshold) and then use a spline algorithm to recreate a line.

任何更好的办法?

推荐答案

请参阅高效的曲线拟合莎拉Frisken。同时还提供在作者的页面

See Efficient Curve Fitting by Sarah Frisken. Also available at the author's page.

这篇关于高效的线平滑(简化)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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