Effacer les filtres
Effacer les filtres

Voronoi polygon patching without looping

1 vue (au cours des 30 derniers jours)
YT
YT le 17 Oct 2018
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

Réponses (0)

Catégories

En savoir plus sur Voronoi Diagram dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by