convex_hull, a MATLAB code which reads a file containing the coordinates of a set of points in 2D, computes the convex hull of the points, and displays it.
The MATLAB code convhull ( ) is used to create the image. For practical calculations, convhull ( ) should be used. This program is designed instead to demonstrate the ideas behind a simple version of the convex hull algorithm in 2D, known as the gift wrapping algorithm.
It is intended to augment this program by including a function which computes and displays the convex hull one edge at a time. This has the advantage of displaying the logic behind the calculation.
convex_hull ( 'prefix' )where
The computer code and data files described and made available on this web page are distributed under the MIT license
convex_hull is available in a MATLAB version.
cg_lab_triangles, a MATLAB code which deals with computational geometry and triangles;
geometry, a MATLAB code which performs geometric calculations in 2, 3 and M dimensional space.
polygon, a dataset directory which contains examples of polygons.
triangulate, a MATLAB code which triangulates a (possibly nonconvex) polygon, based on a C program by Joseph ORourke.