supports two algorithms : our and NN
reads point.dat from file