modified ClosestPair.py, generate points with random function