MeshCoordinates[mreg]
gives a list of coordinates in the mesh region mreg.
MeshCoordinates
MeshCoordinates[mreg]
gives a list of coordinates in the mesh region mreg.
Details
- MeshCoordinates gives a list of coordinates {p1,p2,…}.
- The mesh region mreg can be either MeshRegion or BoundaryMeshRegion.
- The integer indexes returned by MeshCells refer to coordinates in the list {p1,p2,…}.
Examples
open all close allBasic Examples (2)
Get the 2D cell coordinates from a MeshRegion:
ℛ = MeshRegion[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, Polygon[{1, 2, 3, 4}]]MeshCoordinates[ℛ]Get the 3D cell coordinates from a BoundaryMeshRegion:
ℛ = ConvexHullMesh[RandomReal[1, {5, 3}]]MeshCoordinates[ℛ]Scope (4)
Get the coordinates of a 1D BoundaryMeshRegion:
BoundaryMeshRegion[{{0}, {1}}, Point[{{1}, {2}}]]MeshCoordinates[%]A 1D MeshRegion:
MeshRegion[{{0}, {1}, {2}}, {Line[{1, 2}], Point[{3}]}]MeshCoordinates[%]Get the coordinates of a 2D BoundaryMeshRegion:
BoundaryMeshRegion[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, Line[{1, 2, 3, 4, 1}]]MeshCoordinates[%]A 2D MeshRegion:
MeshRegion[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, {Polygon[{1, 2, 3}], Line[{3, 4}]}]MeshCoordinates[%]Get the coordinates of a 3D BoundaryMeshRegion:
ConvexHullMesh[RandomReal[1, {5, 3}]]MeshCoordinates[%]A 3D MeshRegion:
DelaunayMesh[RandomReal[1, {5, 3}]]MeshCoordinates[%]Coordinates that are not used in primitives do not appear in MeshCoordinates:
MeshRegion[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, Polygon[{1, 2, 3}]]MeshCoordinates[%]Applications (2)
Create a GraphicsComplex from a 2D MeshRegion:
ℛ = DelaunayMesh[RandomReal[1, {25, 2}]]The indices given in MeshCells correspond to MeshCoordinates:
pts = MeshCoordinates[ℛ];
polys = MeshCells[ℛ, 2];Create the GraphicsComplex:
Graphics[{FaceForm[LightRed], EdgeForm[Gray], GraphicsComplex[pts, polys]}]Extract the lines from a MeshRegion to make a wireframe mesh:
ℛ = DelaunayMesh[RandomReal[1, {8, 3}]]The indices given in MeshCells correspond to MeshCoordinates:
pts = MeshCoordinates[ℛ];
lines = MeshCells[ℛ, 1];MeshRegion[pts, lines]Properties & Relations (2)
The number of coordinate points is given by MeshCellCount[mreg,0]:
mr = DelaunayMesh[RandomReal[1, {25, 2}]]{Length[MeshCoordinates[mr]], MeshCellCount[mr, 0]}The indices in MeshCells refer to the MeshCoordinates:
mr = MeshRegion[{{0, 0}, {1, 0}, {0, 1}}, Triangle[{1, 2, 3}]]l = MeshCells[mr, {1, 1}]Show[mr, Graphics[{Red, Thick, GraphicsComplex[MeshCoordinates[mr], l]}]]Possible Issues (1)
When a coordinate in MeshRegion is unused, it does not appear in MeshCoordinates:
mr = MeshRegion[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, Polygon[{1, 2, 4}]]MeshCoordinates[mr]The cell indices still refer to MeshCoordinates, not the input coordinates:
MeshCells[mr, 2]Related Guides
History
Text
Wolfram Research (2014), MeshCoordinates, Wolfram Language function, https://reference.wolfram.com/language/ref/MeshCoordinates.html.
CMS
Wolfram Language. 2014. "MeshCoordinates." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MeshCoordinates.html.
APA
Wolfram Language. (2014). MeshCoordinates. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MeshCoordinates.html
BibTeX
@misc{reference.wolfram_2026_meshcoordinates, author="Wolfram Research", title="{MeshCoordinates}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/MeshCoordinates.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_meshcoordinates, organization={Wolfram Research}, title={MeshCoordinates}, year={2014}, url={https://reference.wolfram.com/language/ref/MeshCoordinates.html}, note=[Accessed: 13-June-2026]}