generalized number of points within distance driver