A distribution of probability for location of tested object is the same in the whole plane. Figure 1 shows a typical case.
Presume the situation in the picture and that we should make a test in the extent of bounding-box B. At the beginning let's take only a binary tree. Then we have:
the probability, that we have to test the interior of bounding-box B1 which is outside B2. | |
the analogical case for the bounding-box B2 | |
the probability, that we have to test interior of both bounding-boxes B1 and B2 | |
the probability, that we needn't test anything else |
The number of comparisons performed in the scope of bounding-box B is
Number two in this equation means that we have to test both bounding-boxes B1 and B2 for intersection with the tested object. Then we may have to test the interior of one or both of them. For leaves of a tree (initial bounding-boxes) C(B)=0.
When many overlaps between bounding-boxes occur,
the component
has a high value
and therefore we often have to pass both successors.
This is worse than consecutive processing of bounding-boxes. We can solve this
using a general tree, not only binary. Then we get a general expression: