Borrar filtros
Borrar filtros

Voronoi polygon patching without looping

1 visualización (últimos 30 días)
YT
YT el 17 de Oct. de 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

Respuestas (0)

Categorías

Más información sobre Voronoi Diagram en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by