Im currently looking for some easy explanation of this algorithm for now i see that this pseudocode just removes newly created triangle from list making empty triangle list, i am not quite sure if that pseudocode could even work
For now what i get
Having a set of point get min and max if y and x then create big triangle that covers whole pointset area make a circumcircle out of that tri.
Add that tri to the output tri list
Then loop through all verts for int i loop
If a vertex is inside circumcircle of that super tri add that tri to badtri list
Now for each edge in bad tri
Check whenever other bad tri shares an edge if not add this not shared edge to some outputpolygon, so in first iteration it adds supertriangle to outputtrilist
Now remove that bad triangle from tri list
Now for each edge in outputpolygon form triangle to vert[ i ]
Now if that newly formed triangle contains a vetex from super triangle remove that triangle ---- now thats where my brain blows off you just added a triangle only to remove it damn.
Heres pseducode and below a link to code
BowyerWatson (pointList)
// pointList is a set of coordinates defining the points to be triangulated
triangulation := empty triangle mesh data structure
add super-triangle to triangulation // must be large enough to completely contain all the points in pointList
for each point in pointList do // add all the points one at a time to the triangulation
badTriangles := empty set
for each triangle in triangulation do // first find all the triangles that are no longer valid due to the insertion
if point is inside circumcircle of triangle
add triangle to badTriangles
polygon := empty set
for each triangle in badTriangles do // find the boundary of the polygonal hole
for each edge in triangle do
if edge is not shared by any other triangles in badTriangles
add edge to polygon
for each triangle in badTriangles do // remove them from the data structure
remove triangle from triangulation
for each edge in polygon do // re-triangulate the polygonal hole
newTri := form a triangle from edge to point
add newTri to triangulation
for each triangle in triangulation // done inserting points, now clean up
if triangle contains a vertex from original super-triangle
remove triangle from triangulation
return triangulation
https://github.com/Bl4ckb0ne/delaunay-triangulation/blob/master/delaunay.h
This just doesnt make any sense...
x_X