I have a large set of X,Y,Z coordinates which define the centre points of my spheres in a certain packing. I want to be able to count the number of spheres within a particular distance of each sphere, i.e. how many sphere's are within 1R or 2R of each sphere.
At the moment I'm just checking which other coordinates are nearby using an if loop to check if delta x, y and z are less than 1R. If all 3 deltas are within than value then I count the point.
However as I do this with a large data set I want to try and see if there is a better way of doing this.
Any Suggestions?
JP
Best Answer