I have a cloud of objects, each with a 3D position, and I want to pick out tight groups of these objects.
Specifically, I want to find all objects which form a grouping of radius r within a large cloud of objects. It is likely that the objects are spaced out in vague groupings already, but I need to identify these and essentially put a sphere of radius r around them.
I would prefer to avoid a brute force method if possible - which I presume would be a process of comparing objects against each other to find two within a distance 2r of each other, then putting a sphere in the middle and determining what other objects are within this sphere.
My actual use case is not games related at all, but if an game based example use case would help, here is how I might use it in a game;
The player is flying a plane over a battlefield and has been given orders to bomb the enemy.
To assist the player I want to highlight tight groups of enemies that make prime targets, however the troops on the ground do not move or coordinate in a flocking system, they move completely as individual entities.
Given those criteria, how might I identify the largest groups of objects within the bomb's blast radius?