I have a bunch of particles, and I want to be able to determine which particles has the most “neighbors”. I'll try to do a visual example, each smiley face is a particle in a particle cloud.
<->
<->
<->

is my particles were lined up like this along an axis, I would like these particles grouped. (wanted particles are angry).
<->
<->
:evil: :evil: :evil:
<->
:evil:
since they all have two “neighbors”. This is a very simplified example, but you maybe getting the idea of what I'm after?
Anyway, my explanation skills aren't that good, but if anyone could point me in the right direction I would be mighty grateful.

