필터 지우기
필터 지우기

Voronoi polygon patching without looping

조회 수: 1 (최근 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 CenterFile Exchange에서 Voronoi Diagram에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by