三维voronoi图都有哪些成熟的算法
不知道你要三维的还是二维的,先给你个在MATLAB中生成三维voronoi图的,二维的你就自己查MATLAB帮助文档里的VORONOI函数吧k=20;x=rand(k,1);y=rand(k,1);z=rand(k,1);figure('Color','w')plot3(x,y,z,'Marker','.','MarkerEdgeColor','r','MarkerSize',10,'LineStyle','none')xlabel('X');ylabel('Y');zlabel('Z');axis([01.501.501.5])axisvis3dX=[xyz];[V,C]=voronoin(X);V;fork=1:20disp(C{k})endfork=1:length(C)ifall(C{k}~=1)VertCell=V(C{k},:);KVert=convhulln(VertCell);patch('Vertices',VertCell,'Faces',KVert,'FaceColor','g','FaceAlpha',0.5)endend