From the question "How to get a list of vertices in a convex hull" I can get the list of vertices of each triangle that form each face of the convex hull from a set of {x,y,z} points and also close the triangles by adding the first vertice of each list of vertices at the end of that list.
I am using these lists to plot the figures in $\LaTeX$ using Tikz. The problem with having triangles is that Tikz deals with each triangle as a different face or side of the convex hull and thus it shades them differently even if the triangles are in the same plane or face. For example, the closed triangles of the points in the above-referenced question are
{
{0, 4, 7, 0}, {7, 8, 1, 7}, {6, 4, 2, 6},
{4, 0, 2, 4}, {8, 7, 6, 8}, {7, 4, 6, 7},
{0, 1, 2, 0}, {0, 7, 1, 0}, {1, 8, 2, 1},
{8, 6, 2, 8}
}
which in Tikz plots as
and the results are confusing.
However, if I give the closed list of vertices contained in each face, excluding the connection lines on the same face,
{
{8, 7, 0, 1, 8},
{7, 8, 6, 4, 7},
{4, 2, 1, 0, 4},
{6, 8, 1, 2, 6},
{4, 6, 2, 4, 4},
{4, 7, 0, 4, 4}
}
then the output is clearer.
(The faces that are triangles must be closed twice since the lists of vertices must have the same length)
How could I get only the list of the vertices of each side without the edges on the same face of the convex hull?