This paper presents a new automesh generation method for a convex and cracked convex polygonal domains. We first decompose the polygon into simple sub regions in the shape of triangles. These simple regions are then triangulated to generate a mesh of graded 3-node triangular elements. We propose then an automatic 6-node triangluar conversion scheme by inserting midside nodes to these triangles. Each isolated 6-node triangle is split into four triangles according to the usual scheme,that is,by joining the midside nodes by straight lines. To preserve the mesh conformity a similar procedure is also applied to every triangle of the domain to fully discretize the given convex or cracked convex polygonal domain into all triangles, thus propagating a uniform or graded refinement. The quadrangulation of graded 3-node linear triangles is done by inserting three midside nodes and a centroidal node.Then each graded triangle is split into three quadrilaterals by joining the centroid to the midside nodes. This simple method generates a high quality mesh whose elements confirm well to the requested shape by refining the problem domain. Examples are presented to illustrate the simplicity and efficiency of the new mesh generation method for standard and arbitrary shaped polygonal domains. We have appended MATLAB programs which incorporate the mesh generation scheme developed in this paper. These programs provide valuable output on the nodal coordinates ,element connectivity and graphic display of the all triangular and quadrangular meshes for application to finite element analysis.