WOLFRAM

NearestMeshCells[mr,pt]

给出网格区域 mr 中距点 pt 最近的单元的索引.

NearestMeshCells[mr,pt,n]

给出距点 pt 最近的 n 个单元的索引.

NearestMeshCells[mr,pt,{n,r}]

给出 pt 半径 r 内距点 pt 最近的 n 个或更少单元的索引.

NearestMeshCells[{mr,d},]

给出维度为 d 的单元的索引.

更多信息

  • NearestMeshCells 亦称为最近的点或最近的区域.
  • NearestMeshCells 通常用于查找网格中距给定点最近的单元.
  • 到网格中某个单元的距离就是到该单元中最近的点的距离. 最近的单元是距离最小的单元.
  • NearestMeshCells 返回形式为 {d,{i1,i2,}} 的单元索引列表.

范例

打开所有单元关闭所有单元

基本范例  (2)常见实例总结

求三角形中距一个点最近的线:

Out[1]=1

突出显示这些单元:

Out[2]=2

找出网格区域中最近的单元:

Out[2]=2

突出显示这些单元:

Out[3]=3

范围  (8)标准用法实例范围调查

基本用法  (2)

求距 {2,1} 最近的单元:

Out[2]=2

最近的点:

Out[3]=3

最近的线:

Out[4]=4

求距 {1.5,.5} 最近的 5 个单元:

Out[2]=2

半径 0.5 内最多 10 个单元:

Out[3]=3

网格区域  (2)

找出 MeshRegion 中最近的单元:

Out[1]=1
Out[2]=2

突出显示这些单元:

Out[3]=3

找出 BoundaryMeshRegion 中最近的线:

Out[1]=1
Out[2]=2

突出显示:

Out[3]=3

多边形和多面体  (4)

Polyhedron

Out[20]=20
Out[21]=21

Polygon

Out[2]=2
Out[3]=3

Line

Out[2]=2
Out[3]=3

Point

Out[2]=2
Out[3]=3

应用  (1)用该函数可以解决的问题范例

找出与给定点对应的 Voronoi 单元:

Out[5]=5
Out[6]=6

突出显示 Voronoi 单元:

Out[7]=7

互动范例  (1)有交互式输出的范例

Voronoi 网格周围最近的单元:

Out[2]=2

巧妙范例  (1)奇妙或有趣的实例

航天飞机周围最近的单元:

Out[8]=8
Wolfram Research (2020),NearestMeshCells,Wolfram 语言函数,https://reference.wolfram.com/language/ref/NearestMeshCells.html.

文本

Wolfram Research (2020),NearestMeshCells,Wolfram 语言函数,https://reference.wolfram.com/language/ref/NearestMeshCells.html.

CMS

Wolfram 语言. 2020. "NearestMeshCells." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/NearestMeshCells.html.

APA

Wolfram 语言. (2020). NearestMeshCells. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/NearestMeshCells.html 年

BibTeX

@misc{reference.wolfram_2025_nearestmeshcells, author="Wolfram Research", title="{NearestMeshCells}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/NearestMeshCells.html}", note=[Accessed: 13-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_nearestmeshcells, organization={Wolfram Research}, title={NearestMeshCells}, year={2020}, url={https://reference.wolfram.com/language/ref/NearestMeshCells.html}, note=[Accessed: 13-April-2025 ]}