vispy.geometry.triangulation module

class vispy.geometry.triangulation.Triangulation(pts, edges)

Bases: object

Constrained delaunay triangulation

Implementation based on [1].

Parameters
ptsarray

Nx2 array of points.

edgesarray

Nx2 array of edges (dtype=int).

Notes

  • Delaunay legalization is not yet implemented. This produces a proper triangulation, but adding legalisation would produce fewer thin triangles.

  • The pts and edges arrays may be modified.

References

1

Domiter, V. and Žalik, B. Sweep‐line algorithm for constrained Delaunay triangulation

triangulate()

Do the triangulation.

vispy.geometry.triangulation.triangulate(vertices)

Triangulate a set of vertices

Parameters
verticesarray-like

The vertices.

Returns
verticesarray-like

The vertices.

tringlesarray-like

The triangles.