API of class Voronoi
Source code in voromesh/voronoi/__init__.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|
__init__(points, buffer_size=1, boundary=None)
Bounded 2D Voronoi decomposition for given points. The boundary is either calculated from the buffered convex hull of the given points with the given buffer_size (default) or passed directly.
Parameters
points : numpy.array of shape (npoints, ndim=2) Coordinates of points to construct a Voronoi diagram from. buffer_size : float, Optional Buffer for convex hull >= 0. boundary : shapely.geometry.polygon.Polygon, Optional Boundary for Voronoi decomposition.
Returns
None.
Source code in voromesh/voronoi/__init__.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
plot(center=False, tri=False)
plots the Voronoi diagramm.
Parameters
center : Bool, optional Add center points to plot. The default is False. tri : Bool, optional Add Dilaunay triangulation to plot. The default is False.
Returns
None.
Source code in voromesh/voronoi/__init__.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
to_pyvista(decimalplace=8, dim='Z')
Converts the Voronoi diagram to a pyvista unstructured grid.
Returns
pyvista.UnstructuredGrid: Pyvista unstructured grid
Source code in voromesh/voronoi/__init__.py
102 103 104 105 106 107 108 109 110 111 |
|
to_vtk(decimalplace=8, dim='Z')
Converts the Voronoi diagram to a vtk unstructured grid.
Parameters
decimalplace : int, optional description. Defaults to 8. dim : str, optional description. Defaults to "Z".
Returns:
Name | Type | Description |
---|---|---|
vtkUnstructuredGrid |
VTK unstructured grid |
Source code in voromesh/voronoi/__init__.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|