/points are all in the strip fori numpointsinstripi+forj numpointsinstripj+ifdist(pi pj dist(pi pj )figure brute-force calculation of min(ddc /points are all in the strip and sorted by -coordinate fori numpointsinstripi+forj numpointsinstripj+ifpi and pj ' -coordinates differ by more than break/go to next pi else ifdist(pi pj dist(pi pj )figure refined calculation of min(ddc coordinates differ by more than dthen we can proceed to pi+ this simple modification is implemented in figure this extra test has significant effect on the running timebecause for each pi only few points pj are examined before pi ' and pj ' coordinates differ by more than and force an exit from the inner for loop figure showsfor instancethat for point only the two points and lie in the strip within vertical distance dl dr figure only and are considered in the second for loop