| MATLAB Function Reference | ![]() |
Syntax
[V, C] = voronoin(X)
Description
[V, C] = voronoin(X)
會傳回 Voronoi 圖形 X 中的頂點 V 與異質陣列 C 。 V 是在 n-D 空間中 Voronoi 圖形的頂點所構成的 numv-by-n 的矩陣。 C 是一個異質陣列,它的每一個元素包含了對應至 Voronoi cell 頂點的索引。 X 是一個 m-by-n 陣列,表示有 m n 個點。
Note
voronoin 是基於 qhull 的運算[1]。若要獲得關於 qhull 的資訊,可以參考 http://www.geom.umn.edu/software/qhull/。它的版權問題可參照 http://www.geom.umn.edu/software/download/COPYING.html。
|
Example
x = [ 0.5 0
0 0.5
-0.5 -0.5
-0.2 -0.1
-0.1 0.1
0.1 -0.1
0.1 0.1 ]
V = Inf Inf
0.3833 0.3833
0.7000 -1.6500
0.2875 0.0000
-0.0000 0.2875
-0.0000 -0.0000
-0.0500 -0.5250
-0.0500 -0.0500
-1.7500 0.7500
-1.4500 0.6500
C{:} = 4 2 1 3
10 5 2 1 9
9 1 3 7
10 8 7 9
10 5 6 8
8 6 4 3 7
6 4 2 5
而第五個 Voronoi cell 會包含 4 個點 : V(10,:), V(5,:), V(6,:), V(8,:)。
See Also
Reference
[1] National Science and Technology Research Center for Computation and Visualization of Geometric Structures (The Geometry Center), University of Minnesota. 1993.
| voronoi | waitbar | ![]() |