We propose a new numerical algorithm to construct a structured numerical grid of a doubly connected domain that is bounded by the contour lines of a given function. It is based on the integration of the streamlines of the two vector fields that form the basis of the coordinate system. These vector fields are either built directly from the given function or from the solution of a suitably chosen elliptic equation (which can be solved once an initial grid has been constructed). We are able to construct conformal, orthogonal and curvilinear coordinates. The method is parallelizable and the metric elements can be computed with high accuracy. Furthermore, it is easy to implement as only the integration of well-behaved ordinary differential equations and the inversion of a linear elliptic equation are required. All our grids are orthogonal to the boundary of the domain, which is the major advantage over previously suggested grids. We assess the quality of our grids with the solution of an elliptic equation and the distribution of cell sizes. We find that simple flux aligned orthogonal grids are suitable for the solution of flux aligned problems, which is to be expected, but that they exhibit very large ratios of maximal to minimal cell size. In the conformal grid the aspect ratio of the cells is constant by construction. However, the variation in cell size is large and the errors of the elliptic equation are high. The adapted grid and the grid with monitor metric yield smaller variation in size and smaller errors, where the monitor grid overall has the smallest ratios of maximal to minimal cell size. The errors and cell sizes are competitive with a previously suggested near conformal grid.