MESH2D_HAND MESH2D Applied to Hand Outline

MESH2D_HAND is a MATLAB program which reads in a set of 59 points which outline a human hand, and calls MESH2D, which is able to create a fine triangular mesh of the region outlined by the points.

The original proposer of the hand data exercise was Cleve Moler, in the textbook Numerical Computing with MATLAB.

MESH2D is a powerful and easy-to-use program, by Darren Engwirda, for creating a good quality mesh of a region when the polygonal outline of its boundary is given.

The point of this exercise is simply to emphasize that a fairly general shape region can easily be triangulated, requiring little work from the user.

Languages:

MESH2D_HAND is available in a MATLAB version.

Related Data and Programs:

CONVEX_HULL, a MATLAB program which demonstrates the computation of the convex hull of a set of 2D points.

HAND_DATA, MATLAB programs which carry out some numerical exercises based on data that came from tracing several points on a person's hand.

MAPLE_AREA, a MATLAB library which takes the list of pixels that form the boundary of the image of a maple leaf within a picture, and uses grid, Monte Carlo, and Quasi Monte Carlo sampling to estimate the area of the leaf.

MAPLE_BOUNDARY, a MATLAB library which reads an image of a maple leaf and extracts the list of pixels that form the boundary.

MESH2D, a MATLAB library which can automatically create a triangular mesh for a given polygonal region, by Darren Engwirda.

MESH2D_WRITE, a MATLAB program which demonstrates how MESH2D node and element data can be written to files.

POLYGON, a dataset directory which contains examples of polygons.

TRIANGULATE, a MATLAB program which triangulates a polygonal region.

Reference:

• Cleve Moler,
Numerical Computing with MATLAB,
SIAM, 2004,
ISBN13: 978-0-898716-60-3,
LC: QA297.M625.

Source Code:

• hand_nodes_plot.m, makes a plot of the internal nodes.
• hand_vertices_plot.m, makes a plot of the vertex data that outlines the hand.
• i4mat_write.m, writes an I4MAT to a file.
• mesh2d_hand.m, a function which reads the hand vertex data, calls MESH2D to determine and display the triangulation, and writes the node and element data to files.
• r8mat_write.m, writes an R8MAT to a text file.
• timestamp.m, prints the YMDHMS date as a timestamp.

Examples and Tests:

• hand_elements.txt, the element list, created by MESH2D, which lists triples of nodes that form the elements.
• hand_elements.png, an image of the elements, created by MESH2D.
• hand_nodes.txt, the node coordinate list, created by MESH2D, which lists the X and Y coordinates of the nodes.
• hand_nodes.png, an image of the nodes, created by hand_nodes_plot.m
• hand_vertices.txt, the original hand data, which simply lists the X and Y locations of 59 points that outline a hand.
• hand_vertices.png, an image of the vertices, created by hand_vertices_plot.m
• mesh2d_hand.txt, the output file.

You can go up one level to the MATLAB source codes.

Last revised on 17 January 2016.