The general algorithm involves determining how many particles are within a distance of  and  away from a particle.
The general algorithm determines how many particles are located within a certain range of a given particle.