next up previous
Next: The optimized k-d tree Up: k-d trees Previous: k-d trees

Searching k-d trees

k-d trees are searched recursively. A given 3D point needs to be compared with the separating plane in order to decide on which side the search must continue. This procedure is executed until the leaves are reached. There, the algorithm has to evaluate all bucket points. However, the closest point may be in a different bucket, iff the distance to the limits is smaller than the one to the closest point in the bucket. In this case backtracking has to be performed. Fig. 2 shows a backtracking case, where the algorithms has to go back to the root. The test is known as ball-within-bounds test [4,7,10].



root 2007-05-31