implementation of 2d radial basis function and kmeans algorithm