Adopt algorith in respect to :
[login to view URL] - only Delaunay is of my concern
Keep in mind that only local modification is objective to this project, i don't need algo that incrementally calculates Delaunay and then substracts - it is very important - speed is the factor !!!!
Given:
$points[point_id] = [1,1] - point represntation where point_id = index = int; [1,1] - coords x,y x,y = int
$dmesh[] = [[1,2,3], [4,5,6], ... ] array of triangles( Delaunay triangulation) each point is represented by point_id
algo starts with 4 points constructing bounding box:
point[0] = [0,0]; point[1] = [0,max_int];point[2] = [max_int,max_int];point[3] = [max_int,0];
$dmesh = [[0,1,2], [0,2,3]];
Objectives:
1. function insert_into_dmesh(point_id) {
....
code that modifies dmesh to meet Delaunay triangulation with new point
...
return :
[array of triangles that where removed, array of triangles that where inserted]
}
2. function remove_from_dmesh(point_id) {
....
code that modifies dmesh to meet Delaunay triangulation without new point
...
return :
[array of triangles that where removed, array of triangles that where inserted]
}