用matlab mpt工具箱生成受限的voronoi图.请问该怎么得到各个顶点坐标呢(包括voronoi边与边界的交点)
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/18 11:50:00
用matlab mpt工具箱生成受限的voronoi图.请问该怎么得到各个顶点坐标呢(包括voronoi边与边界的交点)?
extreme这个函数就可以得到顶点坐标.
给你个代码:
function irPoly = getIrreg(m,s)
%GETIRREGULAR Summary of this function goes here
% get irregular pixels
% the same begin & end
% clockwise order
% m - regular size
% S - low/high resolution
% get limit voronoi
x = gallery('uniformdata',[(m*s)^2 1],0);
y = gallery('uniformdata',[(m*s)^2 1],1);
vOut = [0,0; 0,m; m,m; m,0];
P = polytope(vOut);
Options.pbound = P;
% Options.plot = 1;
Pn = mpt_voronoi(m*[x,y],Options);
% split each polygon
for iPoly = 1:length(Pn)
thisPoly = extreme(Pn(iPoly));
% limited in [0,m]
thisPoly(thisPoly>m) = m;
thisPoly(thisPoly
给你个代码:
function irPoly = getIrreg(m,s)
%GETIRREGULAR Summary of this function goes here
% get irregular pixels
% the same begin & end
% clockwise order
% m - regular size
% S - low/high resolution
% get limit voronoi
x = gallery('uniformdata',[(m*s)^2 1],0);
y = gallery('uniformdata',[(m*s)^2 1],1);
vOut = [0,0; 0,m; m,m; m,0];
P = polytope(vOut);
Options.pbound = P;
% Options.plot = 1;
Pn = mpt_voronoi(m*[x,y],Options);
% split each polygon
for iPoly = 1:length(Pn)
thisPoly = extreme(Pn(iPoly));
% limited in [0,m]
thisPoly(thisPoly>m) = m;
thisPoly(thisPoly
用matlab画有边界的voronoi图,怎么画?
matlab中生成voronoi图时,能否设定一个边界使得voronoi顶点不出现无穷远点?
请帮我看一下下面的matlab代码,关于voronoi图的.
求grasshopper生成2D voronoi的电池图连接方法~
matlab中生成voronoi图,急用,希望各位大神帮助一下!
GIS 怎样画加权的voronoi图形?
怎样画voronoi图
请问怎么不使用matlab的遗传算法工具箱用matlab遗传算法求极值?
请问怎样在matlab中得到直线方程与plot出的曲线之间的交点坐标
matlab的遗传算法优化工具箱怎么用?
MapInfo中可不可以做加权Voronoi图,可以的话怎么做,具体步骤是什么?请懂得人回答!
请问在哪能下的matlab的神经网络工具箱