A graph based algorithm for generating the delaunay triangulation of a point set within an arbitrary 2D domain (denoted as DTAD for short) is presented in this paper. The basic idea is to calculate the CMST(constrained minimum spanning tree) of the given points within an arbitrary 2D domain. The CMST is then augmented to triangle mesh. Finally the DTAD is obtained by local optimal transformation. The actual application of the algorithm in the automatic finite element mesh generation is also shown in the paper.