resqpy.olio.triangulationΒΆ

triangulation.py: functions for finding Delaunay triangulation and Voronoi graph from a set of points.

Functions

ccc

Returns the centre of the circumcircle of the three points in the xy plane.

dt

Returns the Delauney Triangulation of 2D point set p.

edges

Returns unique edges as pairs of point indices, and a count of uses of each edge.

internal_edges

Returns a subset of all edges where the edge count is 2.

make_all_clockwise_xy

Modifies t in situ such that each triangle is clockwise in xy plane (viewed from -ve z axis).

reorient

Returns a reoriented copy of a set of points, such that z axis is approximate normal to average plane of points.

rim_edges

Returns a subset of all edges where the edge count is 1.

rims

Returns edge index and points index lists of distinct rims.

surrounding_xy_ring

Creates a set of points surrounding the point set p, in the xy plane.

triangles_using_edge

Returns list-like 1D int array of indices of triangles using edge identified by pair of point indices.

triangles_using_edges

Returns int array of shape (len(edges), 2) with indices of upto 2 triangles using each edge (-1 for unused).

triangles_using_point

Returns list-like 1D int array of indices of triangles using vertex identified by point_index.

triangulated_polygons

Returns triangulation of polygons using centres as extra points.

voronoi

Returns dual Voronoi diagram for a Delauney triangulation.