Extracting a smooth curve from unordered data has many applications to image analysis. However, many reported methods assume either that the shape of the input data is known a priori or that the boundary of the data is clearly defined. We present a method that can handle several types of data sets. The main idea of the method is to extract a generalized curve, which passes through the data set. The proposed method is able to extract a smooth curve from complicated unordered pattern data and without any prior knowledge of the shape of the input data. Experimental results show that our method can produce good results for many data sets including handwritten Chinese characters.