Borrar filtros
Borrar filtros

重み付きvoronoi(ボロノイ)図の作成方法

6 visualizaciones (últimos 30 días)
takumi
takumi el 1 de Sept. de 2024
重み付きVoronoi図の作成方法について質問です.
以下のように母点が必ずボロノイ境界内にあるように処理したコードを書きました.
ここから重み付きVoronoi図を作成する方法をご存じの方おりましたらご教授願います.
clc,clear,close all
P=[1 2 4 10 7;4 5 9 6 3]'; %母点
%母点がボロノイ境界内にあるように処理
space=0.5;
min_x=min(P(:,1))-space;
min_y=min(P(:,2))-space;
max_x=max(P(:,1))+space;
max_y=max(P(:,2))+space;
range_x=max_x-min_x;
range_y=max_y-min_y;
mar=range_x+range_y;
cx=(min_x+max_x/2);
cy=(min_y+max_y/2);
nP=[P; min_x - mar, cy; max_x + mar, cy; cx, min_y - mar; cx, max_y + mar];
[Vx Vy]=voronoi(nP(:,1),nP(:,2));
plot(Vx,Vy,'k')

Respuestas (0)

Categorías

Más información sobre ビッグ データの処理 en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!