Home > Net >  Delaunay triangulation from voronoi tessellation
Delaunay triangulation from voronoi tessellation

Time:10-04

I would like to know how Delaunay triangulation can be done to find the connectivity of the cells formed by voronoi tessellation

The following is the code that I'm using to generate voronoi cells.

import numpy as np
from scipy.spatial import Voronoi, voronoi_plot_2d
import shapely.geometry
import shapely.ops

points = np.random.random((20, 2))
vor = Voronoi(points)
fig = voronoi_plot_2d(vor)
plt.show()

Could someone please help me with finding the cell connectivity by applying Delaunay triangulation ?

CodePudding user response:

vor.ridge_points is a Nx2 array containing all the Delaunay edges. The values are the indices into the input array points. For example, one edge goes from point number vor.ridge_points[0,0] to point number vor.ridge_points[0,1].

  • Related