The constrained triangulation is done with 3 steps:

- Regularize the point and edge sets
- Use the chain method to decompose the regular PSLG
- Triangulate the monotone polygons

Let us consider the left-to-right sweep first. When the sweepline meets a vertex, we first check if the vertex has incoming edge. If not, the vertex if left irregular and we add an edge connecting the vertex with the last vertex passed by the sweep line which lies between the neighboring active edges of the current vertex. If there is incoming or outgoing edges, we have to make changes to the balanced tree. Any incoming edge is deleted and outgoing edge is added.

The right-to-left sweep is similar. The regularized PSLG we got has the following properties:

- No two edges intersect (except at vertices)
- Each vertex (except the left-most) is joined directly to at least one vertex that lies to the right.
- Each vertex (except the right-most) is joined directly to at least one vertex that lies to the left.

The final step is the triangulation of the regularized PSLG. We use the chain method to undertake this task. Interested readers could read "Computational Geometry" by Preparata.

It is possible for the graph to have only one chain. The it can not be triangulated. So convex hull of the point set is added. In our problem, it is easy to undertake this task. One only need to consider the top-most chain and the bottom-most chain.

For the convenience of the above procedures, we use the hashtable to store the edges associated with each vertex. The key for the entry is the vertex. And we use a list to store more than one edges associated with the vertex.

After the regularization step, we need to sort the edges associated with each vertex. In many real problems, only a few points are associated with one vertex. So the sorting time is linear. Even in the worst case, it is clear that the time is still bounded by NlogN, since one edge only has two points associated with it (the starting point and the ending point).