Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to enforce edges (constrained delaunay triangulation) in scipy.spatial's Delaunay?

I am experimenting with scipy.spatial's implementation of Qhull's Delaunay triangulation.

Is it possible to generate the triangulation in a manner that preserves the edges defined by the input vertices? (EDIT: i.e. a constrained Delaunay triangulation.) As can be done with the triangle package for Python.

For example, in the picture below there are several triangles (blue) that disregard the location of the edges (red) that are defined by the vertices. Is there a way to enforce these edges such that they are in all cases part of the triangulation result?

Delaunay Triangulation

like image 385
songololo Avatar asked Feb 11 '23 01:02

songololo


1 Answers

What you are looking for is called constrained Delaunay triangulation, and unfortunately the scipy.spatial implementation does not support it.

As you pointed out, triangle does have that feature -- why not use it instead?

like image 110
cfh Avatar answered Feb 15 '23 10:02

cfh