A fast method to generate curvilinear coordinate systems with arbitrary line densities in the physical region is presented. There are no restrictions on the shape of the surrounding boundaries. Two numerical examples are given to show the validity of the method ; one is a rhomb as a typical shape of an inner boundary with many corners on its contour, and the other is a Karman-Trefftz airfoil as a typical case of a cusped body. In the latter case, in particular, an orthogonal curvilinear coordinate system can be obtained when a conformal mapping technique is used simultaneously. Moreover, it is expected that this grid generation procedure can be applied to a wide variety of other problems.