algorithmspace-partitioning

Space partitioning algorithm


I have a set of points which are contained within the rectangle. I'd like to split the rectangles into subrectangles based on point density (giving a number of subrectangles or desired density, whichever is easiest).

The partitioning doesn't have to be exact (almost any approximation better than regular grid would do), but the algorithm has to cope with the large number of points - approx. 200 millions. The desired number of subrectangles however is substantially lower (around 1000).

Does anyone know any algorithm which may help me with this particular task?


Solution

  • Just to understand the problem. The following is crude and perform badly, but I want to know if the result is what you want>

    Assumption> Number of rectangles is even
    Assumption> Point distribution is markedly 2D (no big accumulation in one line)

    Procedure>
    Bisect n/2 times in either axis, looping from one end to the other of each previously determined rectangle counting "passed" points and storing the number of passed points at each iteration. Once counted, bisect the rectangle selecting by the points counted in each loop.

    Is that what you want to achieve?