Note that our points are going to be inside a rectangular frame that is passed as a parameter to cvCreateSubdivDelaunay2D. In order to create a subdivision, we also need to create and initialize a memory storage structure. This can be seen in the first five lines of the preceding code. Then, in order to create the triangulation, we need to insert points using the cvSubdivDelaunay2DInsert function. This happens inside the for loop in the preceding code. Please note that the points should already have been initialized, since they are the ones we'll usually be using as inputs. The
following screenshot shows what the triangulation could look like: