Delaunay 2D算法
整个算法的流程如下所示:
Incremental Delaunay Triangulation.
1 Construct an initial triangle, which is large.
2 Randomly generate a point p in the unit square.
3 InsertVertex(p).
4 Repeat step 2 and 3
整个算法的关键在于insertVertex函数
InsertVertex(p)
1 pFace = LocatePoint(p)
2 FaceSplit( pFace )
3 Legalize three edges of the original pFace.
inCircle函数
用于判断P是否位于三角形 [vi,vj,vk] 的外接圆中
若位于三角形 [vi,vj,vk] 中,则:
inCircle(pi,pj,pk,p)=det⎛⎝⎜⎜⎜⎜⎜pixp