why treating the supertriangle's vertices in Bourke's Delaunay triangulation algorithm?

StackOverflow https://stackoverflow.com/questions/17046255

  •  31-05-2022
  •  | 
  •  

Question

P. Bourke proposes an interesting algorithm here: http://paulbourke.net/papers/triangulate/ but I don't understand why he adds the supertriangle's vertices to the end of the vertices list in "add supertriangle vertices to the end of the vertex list" since they are naturally treated by creating the supertriangle.

Était-ce utile?

La solution

It's a detail of implementation (and the rest of the algorithm doesn't go down to that level).

In his data representation, a triangle is a triplet of vertices, and vertices are represented by their index in the vertex "list" (in fact an array). So after having computed the coordinates of the vertices of the supertriangle, he adds the vertices to the vertex list and then create the triangle using the three indices.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top