The division of positions into triangles?

Hi.

Quite a complicated problem.

Let's say I have an array of coordinates (3D space):

{4.00, 34.33, 34.33},
{23.00, 35.33, 53.33},
{43.00, 72.33, 32.33},
{52.00, 72.33, 42.33},
{62.00, 58.33, 37.33}

Well, in the picture it looks somehow like this (draw in 2D but imagine this view from the top) Well, I need to write an algorithm which would divide these positions into triangles. And recorded in a separate array the construction of these triangles. I mean for example:
The first triangle is the first cell coordinate, the second cell coordinate, the third coordinate of the cell
The second triangle is - the first cell is coordinate, the third coordinate of the cell, fourth cell coordinates
Etc.

Well, in C++ from 0 cells so:

{0. 1, 2},
{0, 2, 3},
etc.

And so to make it dynamically, if the in the array of coordinates of at least 1,000 positions, all these positions were divided into triangles and were recorded separately in an array of cell coordinates of the triangles.

Think described.

But the main thing that the triangles on top of each other do not have nalazili, like so: Thank you all.
June 14th 19 at 19:18