matlab中生成voronoi图时,能否设定一个边界使得voronoi顶点不出现无穷远点?

2022-03-26 教育 241阅读
下个mpt工具箱
里面的mpt_voronoi可以实现你的要求

MPT_VORONOIComputesthevoronoidiagramviampLP

[Pn]=mpt_voronoi(points,Options)

---------------------------------------------------------------------------
DESCRIPTION
---------------------------------------------------------------------------
Thevoronoidiagramisapartitionofthestatespace;Foragivensetof
pointspj,eachregionPn(j)isdefinedas
Pn(j)={x\inR^n|d(x,pj)<=d(x,pi),\foralli\neqj}

---------------------------------------------------------------------------
INPUT
---------------------------------------------------------------------------
points-Optionalinput:
Matrixptimesnxofpoints:nxisstatespacedimensionand
pisthenumberofpoints
Theentryisgraphicalin2Difnoparametersarepassed.
Options.pbound-A"boundingpolytope".Ifprovided,thevoronoicellswill
beboundedbythispolytope.Ifnotprovided,thecellswill
beboundedbyahypercubeasbigas1.5xthemaximum
coordinateofanyoftheseedpoints
Options.plot-Ifsetto1,plotsthevoronoidiagram(0isdefault)
Options.sortcells-Ifsetto1,resultingVoronoipartitionwillbeordered
inawaysuchthatPn(i)correspondstoseedpointi.
(Defaultis1)
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com