Problem statement
An pentagon is a regular polygon with 5 vertices and 5 edges. Here below is an example of the vertex set V, corresponding to the XYZ coordinates column vectors of a pentagon included in the unit circle.
V = [1 0 0;
cos(2*pi/5) sin(2*pi/5) 0;
cos(4*pi/5) sin(4*pi/5) 0;
cos(4*pi/5) sin(-4*pi/5) 0;
cos(2*pi/5) sin(-2*pi/5) 0];
A triangulated mesh T (stands for triangles here) -or a triangulation- is simply a N x 3 matrix of positive integers where each row contains the vertex indices of a triangle, and where N is the number of triangles.
Your task here is to mesh this pentagon with the minimum possible number of triangles. To do so, you will list the pentagons/rows in a matrix of faces, F. The row order of the triangles in the list doesn't matter.
Example
The first triangle here can be [1, 2, 3] if counterclockwise oriented.
Tip
Beware to avoid self intersecting triangles.
Forbidden functions / expressions
  • regexp
  • assignin
  • str2num
  • echo
See also

Solution Stats

40 Solutions

31 Solvers

Last Solution submitted on Feb 10, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...