フィルターのクリア

Voronoi polygon patching without looping

3 ビュー (過去 30 日間)
YT
YT 2018 年 10 月 17 日
I recently learned that you can patch delaunay triangles easily in one go by using the options `Faces` and `Vertices`, but for the voronoi polygons it isn't that straightforward because they have a variable amount of vertices/faces (stored in a cell array `c`).
So now I don't know if it's even possible, but can you patch all voronoi polygons without looping? And if so, is it more efficient (time) compared to looping?
[v,c] = voronoin(X)
for i = 1:length(c)
if all(c{i}~=1)
patch(v(c{i},1),v(c{i},2),RGB2(i,:)/256,'EdgeColor','none');
end
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeVoronoi Diagram についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by