NearestMeshCells
NearestMeshCells[mr,pt]
gives the indices for the cells to which the point pt is nearest in the mesh region mr.
NearestMeshCells[mr,pt,n]
gives the n nearest cell indices to pt.
NearestMeshCells[mr,pt,{n,r}]
gives the n or fewer nearest cell indices to pt that are within radius r of pt.
NearestMeshCells[{mr,d},…]
gives the indices for the cells of dimension d.
Details
- NearestMeshCells is also known as nearest point or nearest region.
- NearestMeshCells is typically used to find the closest cells in mesh from a given point.
- The distance to a cell in a mesh is the distance to the closest point in that cell. The nearest cell is the one with the smallest distance.
- NearestMeshCells returns a list of cell indexes of the form {d,{i1,i2,…}}.
Examples
open allclose allBasic Examples (2)
Scope (8)
Basic Uses (2)
Mesh Regions (2)
Find the nearest cell in a MeshRegion:
Find the nearest line in a BoundaryMeshRegion:
Polygons & Polyhedra (4)
Text
Wolfram Research (2020), NearestMeshCells, Wolfram Language function, https://reference.wolfram.com/language/ref/NearestMeshCells.html.
CMS
Wolfram Language. 2020. "NearestMeshCells." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NearestMeshCells.html.
APA
Wolfram Language. (2020). NearestMeshCells. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NearestMeshCells.html