フィルターのクリア

Voronoi Diagram with Delaunay Triangulation circle overlay with restrctions

2 ビュー (過去 30 日間)
Sean
Sean 2014 年 6 月 19 日
コメント済み: wang 2020 年 12 月 11 日
Is there a way to place restrictions on how Voronoi Diagrams, or Delaunay Triangulation operates as a Matlab function? For the code below I am trying to find out if it is possible to manipulate the voronoi point locations, or how the circles interact with the delaunay triangles (as well as remove the arcs), or something to achieve something close to the following picture (right).
clc; clear all; close all;
n=5;
x = 720*rand(1, n);
y = 360*rand(1, n);
voronoi(x,y,'--k');
DT = DelaunayTri(x', y');
% use this in newer versions of matlab
% DT = delaunayTriangulation (x, y);
hold all;
triplot(DT,'k-');
[centers, radii] = DT.circumcenters();
theta = -pi:pi/20:pi;
for iCircle=1:size(centers,1)
xCircle = centers(iCircle,1) + radii(iCircle)*cos(theta);
yCircle = centers(iCircle,2) + radii(iCircle)*sin(theta);
plot(xCircle, yCircle, 'b-');
end
plot(x,y,'+k', 'MarkerSize', 12)
axis equal;
hold on
  1 件のコメント
wang
wang 2020 年 12 月 11 日
It is also my question, how to produce the right figure?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeDelaunay Triangulation についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by