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[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)
NearestMeshCells[{Triangle[], 1}, {1, 1}]Show[HighlightMesh[Triangle[], %], Graphics[{Red, Point[{1, 1}]}]]ℛ = MeshRegion[{{0, 0, 0}, {1, 0, 0}, {2, 0, 0}, {3, 0, -1 / 2}, {3, 0, 1 / 2}, {4, -1 / 2, 0}, {4, 1 / 2, 0}}, {Point[1], Line[{2, 3}], Triangle[{3, 4, 5}], Tetrahedron[{4, 6, 5, 7}]}];NearestMeshCells[ℛ, {2, 1, 1}]Show[HighlightMesh[ℛ, %], Graphics3D[{Red, Point[{2, 1, 1}]}]]スコープ (8)
基本的な用法 (2)
ℛ = MeshRegion[{{0, 0}, {1, 0}, {2, 1 / 2}, {2, -1 / 2}}, {Line[{1, 2}], Triangle[{2, 3, 4}]}];NearestMeshCells[ℛ, {2, 1}]NearestMeshCells[{ℛ, 0}, {2, 1}]NearestMeshCells[{ℛ, 1}, {2, 1}]ℛ = VoronoiMesh[RandomReal[1, {50, 2}]];NearestMeshCells[ℛ, {1.5, .5}, 5]NearestMeshCells[ℛ, {1.5, .5}, {10, .5}]メッシュ領域 (2)
MeshRegion内で最も近いセルを求める:
ℛ = DelaunayMesh[RandomReal[1, {50, 3}]]NearestMeshCells[ℛ, {1, 0, 1}]Show[HighlightMesh[ℛ, %], Graphics3D[{Red, Point[{1, 0, 1}]}]]BoundaryMeshRegion内の最も近い線を求める:
ℛ = BoundaryMeshRegion[{{0, 0}, {3, 0}, {3, 3}, {0, 3}, {1, 1}, {2, 1}, {2, 2}, {1, 2}}, Line[{1, 2, 3, 4, 1}], Line[{5, 6, 7, 8, 5}]]NearestMeshCells[{ℛ, 1}, {5, 1.5}]Show[HighlightMesh[ℛ, %], Graphics[{Red, Point[{5, 1.5}]}]]多角形と多面体 (4)
ℛ = Polyhedron[{{-0.85065080835204, 0., 1.1135163644116066}, {-0.2628655560595668, 0.8090169943749475,
1.1135163644116066}, {-0.42532540417602, 1.3090169943749475, 0.2628655560595668},
{-1.1135163644116066, 0.8090169943749475, -0.262865556059566 ...
{{1, 2, 3, 4, 5}, {6, 7, 1, 5, 8}, {9, 10, 6, 8, 11}, {12, 13, 9, 11, 14}, {4, 14, 11, 8, 5},
{3, 15, 12, 14, 4}, {16, 17, 10, 9, 13}, {18, 16, 13, 12, 15}, {19, 18, 15, 3, 2},
{20, 19, 2, 1, 7}, {17, 20, 7, 6, 10}, {16, 18, 19, 20, 17}}];NearestMeshCells[ℛ, {1.5, 1, 1}]Show[HighlightMesh[ℛ, %], Graphics3D[{Red, Point[{1.5, 1, 1}]}]]ℛ = Polygon[{{{0, 0}, {1, 0}, {0, 1}}, {{1, 1}, {2, 1}, {1, 2}}}];NearestMeshCells[ℛ, {1, .8}]Show[HighlightMesh[ℛ, %], Graphics[{Red, Point[{1, .8}]}]]Line:
ℛ = Line[{{1, 0}, {2, 1}, {3, 0}, {4, 1}}];NearestMeshCells[Line[{{1, 0}, {2, 1}, {3, 0}, {4, 1}}], {1, 1}]Show[HighlightMesh[ℛ, %], Graphics[{Red, Point[{1, 1}]}]]ℛ = Point[Table[{t, Sin[t]}, {t, 0, 2π, 2π / 10}]];NearestMeshCells[ℛ, {1.2, .5}]Show[HighlightMesh[ℛ, %], Graphics[{Red, Point[{1.2, .5}]}]]アプリケーション (1)
インタラクティブな例題 (1)
関連するガイド
テキスト
Wolfram Research (2020), NearestMeshCells, Wolfram言語関数, 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
BibTeX
@misc{reference.wolfram_2026_nearestmeshcells, author="Wolfram Research", title="{NearestMeshCells}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/NearestMeshCells.html}", note=[Accessed: 07-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_nearestmeshcells, organization={Wolfram Research}, title={NearestMeshCells}, year={2020}, url={https://reference.wolfram.com/language/ref/NearestMeshCells.html}, note=[Accessed: 07-November-2026]}