Poly2Tri介绍
這是Poly2Tri介紹的翻譯博文。
 原文鏈接:http://sites-final.uclouvain.be/mema/Poly2Tri/poly2tri.html
引言
三角化算法一直是** 計算幾何(computational geometry)** 方向的研究熱點。
 前人研究發展如下表所示:
 
圖片來源:http://www-cgrl.cs.mcgill.ca/~godfried/teaching/cg-projects/97/Thierry/thierry507webprj/complexity.html
前人對三角化算法總結鏈接:http://vterrain.org/Implementation/Libs/triangulate.html
計算幾何領域通常認定三種最常用的算法:- recursive ear cutting algorithm最容易實現,但是性能最糟,并且難以擴展到存在洞的多邊形情況
- incremental randomized algorith性能可能是最好的,但是難以實現
- sweep line algorithm相對來說,性能中和,使用更為廣泛
Sweep Line Algorithm
Mark de Berg, Marc van Kreveld, Mark Overmars, and Otfried Schwarzkopf and J. O’Rourke 等人總結了Sweep Line Algorithm,詳見引用[5] [6]
Sweep Line Algorithm基本策略:為了將多變形單調化(monotone),需要將多變形頂點分成5種類型:開始頂點(start vertex)、結束頂點(end vertex)、分割頂點(split vertex)、合并頂點(merge vertex)、規則頂點(regular vertex)。原文作者為了容易實現這個算法,又將規則頂點分為規則向下的頂點(regular down)和規則向上的頂點(regular up),如下圖1.a所示。作者對此種分法的解釋如下:多變形頂點順時針組織,洞的方向也是順時針,內部的多變形肯定位于外部多邊形規則向上的點的左邊,而位于規則向下的點的右邊,這樣約定,在實現中對一些判斷不需要額外的計算和存儲。
A polygon can be partitioned to monontone pieces by getting rid of its split or merge vertices (adding diagonals). When a diagonal is inserted, an auxliary diagonal is inserted at the same time on the opposite direction for monotone piece searching purpose (all monotone pieces can be easily constructed by these auxiliary diagonals since each diagonal is always shared by two adjacent monontone pieces), see Figure 1.b. Specificly, for each split vertex vi, a diagonal is inserted to the lowest vertex above it. On the contrary, for each merge vertex, a diagonal is inserted to the highest vertex below it. This lowest/highest vertex is often called helper of directly left edge of vi.
Poly2Tri算法例子
 
還有更多的例子,可點擊原文鏈接查看
引用
總結
以上是生活随笔為你收集整理的Poly2Tri介绍的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 什么是陀螺仪的dr算法_陀螺仪与加速传感
- 下一篇: 嵌入式期末大作业——家用智能晾衣杆
