**mesh_boundary**,
a Python code which
is given a mesh of a 2D region, formed by polygonal elements,
and determines a sequence of pairs of polygonal vertices that
define the boundary of the region.

The computer code and data files described and made available on this web page are distributed under the MIT license

**mesh_boundary** is available in
a MATLAB version and
an Octave version and
a Python version.

boundary_node_list, a FreeFem++ code which defines a 2D mesh, and then shows how to determine the number of boundary elements, that is, sides of triangles, and how to list the indices of the pairs of nodes that form the boundary.

cloud, a FreeFem++ code which starts with a black and white drawing of a cloud, uses MATLAB to extract the boundary, reads the boundary into FreeFem++ and solves a Poisson problem over the region.

human_data, a Python code which starts with an image of simple outline of a human body, tabulates a sequence of points on the outline, creating numerical data defining the boundary. It is then able to fill the region with mesh points and triangulate the region. This allows the region to be analyzed by the finite element method (FEM).

image_boundary, a Python code which reports the pixels which form the boundary between the black and white regions of a simple image.

maple_boundary, a Python code which reads an image of a maple leaf and extracts the list of pixels that form the boundary.

tet_mesh_boundary, a Python code which returns the nodes and faces of the boundary of a mesh of tetrahedrons, which themselves form a 3D triangular mesh or tri_surface.

triangulation_boundary, a Python code which starts with a triangulation of a simple shape, and determines the triangle edges that form the boundary, and a sequence of nodes that trace the boundary.

triangulation_boundary_edges, a Python code which reads data defining a triangulation, determines which edges lie on the boundary, organizes them into connected components, and writes this information to a file.

triangulation_boundary_nodes, a Python code which reads data defining a triangulation, determines which nodes lie on the boundary, and writes their coordinates to a file.

- mesh_boundary.py, the source code.
- mesh_boundary.sh, runs all the tests.
- mesh_boundary.txt, the output file.