一种算法充气/放气(偏移,缓冲)多边形 [英] An algorithm for inflating/deflating (offsetting, buffering) polygons

查看:316
本文介绍了一种算法充气/放气(偏移,缓冲)多边形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新:数学术语,我要找的是真正的向内/向外多边形抵减。 +1巴林特指出这一点。另一种命名为多边形缓冲

UPDATE: the math term for what I'm looking for is actually inward/outward polygon offseting. +1 to balint for pointing this out. The alternative naming is polygon buffering.

更新2 (02.11.2011):检查出新接受的答案 - 帆船库由安格斯约翰逊

UPDATE 2 (02.11.2011): check out the newly accepted answer - Clipper library by Angus Johnson.

在我开始从头开始开发自己的解决方案,没有人知道任何好的来源的算法,可以充气多边形,类似这样:

Before I start developing my own solution from scratch, does anyone know of any good source for an algorithm that can inflate a polygon, something similar to this:

要求是新(充气)多边形的边/点都在从旧的(原)多边形的(在这个例子PIC相同的恒定距离。他们都没有,因为那就必须使用弧形的充气顶点,但让我们忘记了现在;))。

The requirement is that the new (inflated) polygon's edges/points are all at the same constant distance from the old (original) polygon's (on the example pic. they are not, since then it would have to use arcs for inflated vertices, but let's forget about that for now ;) ).

我的搜索结果:

下面是一些链接:

  • 在多边形抵减策略
  • 调查
  • <一个href="http://groups.google.si/group/comp.graphics/browse_thread/thread/4799ab44d71f434e/e3ec0b40c231706c?hl=en&ie=UTF-8&q=offset+polygon&pli=1">Polygon偏移,问题
  • 缓冲多边形数据
  • A Survey of Polygon Offseting Strategies
  • Polygon offset, PROBLEM
  • Buffering Polygon Data

推荐答案

据我所知,这个问题被问与提供的答案和前接受了一些时间。不过我想我可能会提一提我自己的多边形裁剪和抵消库 - 快船 - 万一别人还在寻找一个解决这个问题。

I understand that this question was asked with an answer provided and accepted some time ago. Nevertheless I thought I might briefly mention my own polygon clipping and offsetting library - Clipper - in case others are still searching for a solution to this problem.

虽然的主要设计用于多边形裁剪操作,它确实多边形抵消了。图书馆是开源免费软件写在的Delphi,C ++和C#。它具有非常支配升压的许可证允许它在两个不收费免费软件和商业应用中使用。

While Clipper is primarily designed for polygon clipping operations, it does polygon offsetting too. The library is open source freeware written in Delp C++ and C#. It has a very unencumbered Boost license allowing it to be used in both freeware and commercial applications without charge.

多边形抵消可使用三个中的一个偏移方式进行 - 方形,圆形,斜接

Polygon offsetting can be performed using one of three offset styles - squared, round and mitered.

这篇关于一种算法充气/放气(偏移,缓冲)多边形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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