用于将2d多边形最佳细分(即曲面细分/分割)成较小多边形的算法?

时间:2012-09-10 11:18:52

标签: algorithm polygon partitioning plane tessellation

我有一些2D多边形,每个都是一个顺时针坐标列表。多边形是 simple(即它们可能是凹的,但它们不相交)并且它们不会相互重叠。

我需要将这些多边形细分为更小的多边形以适应大小约束。就像原始多边​​形一样,较小的多边形应该是简单的(非自相交),并且约束是它们应该都适合一个'单位平方'(为简单起见,我可以假设为1x1)。 / p>

问题是,我需要尽可能高效地完成这项工作,其中“高效”意味着可能产生的最小数量(小)多边形。计算时间并不重要。

是否有一些智能算法?起初我想过递归细分每个多边形(将它分成两半,水平或垂直,无论哪个方向更大)都可以工作,但我似乎没有得到非常优化的结果。有什么想法吗?

2 个答案:

答案 0 :(得分:8)

绘制一个圆,其中心为初始多边形的一个初始点和所需长度约束的半径。

圆圈将在两点交叉至少两条线。现在你的第一个三角形尽可能大。然后选择那些交叉点作为下一个目标。直到外面没有任何初始点。你的三角形尽可能大(尽可能少)

  • 不要将已创建的三角形边缘视为交叉点。
  • 生成的多边形不总是三角形,也可以是四边形。也许更大的点数!
  • 它们几乎都等于所需的尺寸。

enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here {{ 0}} enter image description here

微调内部零件需要一些计算。

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

答案 1 :(得分:4)

我建议您使用以下内容:

  1. 对多边形进行三角测量,例如使用扫描线算法。

  2. 确保所有三角形都不违反约束。如果违反约束,首先尝试边缘翻转来修复它,否则细分最长边。

  3. 使用动态编程连接三角形,同时保持约束并仅连接相邻的多边形。