**polygon_grid_test**,
a C++ code which
calls polygon_grid(), which
generates a grid of points
over the interior of a polygon in 2D.

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

polygon_grid, a C++ code which generates a grid of points over the interior of a polygon in 2D.

- polygon_grid_test.cpp, a sample calling program.
- polygon_grid_test.sh, runs all the tests.
- polygon_grid_test.txt, the output file.

ELL is an L-shaped (non-convex!) polygon for which the program output doesn't look too bad, although the grid is degenerate.

- ell_commands.txt, the gnuplot command file.
- ell_grid.txt, the grid point coordinates.
- ell_vertex.txt information about the polygon vertices and centroid that are used to draw boundary lines.
- ell.png a plot of the grid.
- ell.xy the grid points.

QUAD is a quadrilateral polygon.

- quad_commands.txt, the gnuplot command file.
- quad_grid.txt, the grid point coordinates.
- quad_vertex.txt information about the polygon vertices and centroid that are used to draw boundary lines.
- quad.png a plot of the grid.
- quad.xy the grid points.

TRIANGLE is a triangular polygon.

- triangle_commands.txt, the gnuplot command file.
- triangle_grid.txt, the grid point coordinates.
- triangle_vertex.txt information about the polygon vertices and centroid that are used to draw boundary lines.
- triangle.png a plot of the grid.
- triangle.xy the grid points.