Bin (Computational Geometry)
Bin (Computational Geometry)
Bin (Computational Geometry)
Operations
Query
From the query rectangle Q, we can find out which bin its lower-left corner intersects efficiently by simply
subtracting the bin's bounding box's lower-left corner from the lower-left corner of Q and dividing the result by the
width and height of a bin respectively. We then iterate the bins Q intersects and examine all the candidates in the
linked-lists of these bins. For each candidate we check if it does indeed intersect Q. If so and it is not previously
reported, then we report it. We can use the convention that we only report a candidate the first time we find it. This
can be done easily by clipping the candidate against the query rectangle and comparing its lower-left corner against
the current location. If it is a match then we report, otherwise we skip.
Bin (computational geometry) 2
See also
• kd-tree is another efficient range query data structure.
• Space partitioning
Article Sources and Contributors 3
License
Creative Commons Attribution-Share Alike 3.0 Unported
http:/ / creativecommons. org/ licenses/ by-sa/ 3. 0/