Abstract: Given a setof objects, called a scene, the ray-shooting problem asks, given a ray, what is the first object in
intersected by this ray. A popular approach to speed up ray-shooting queries is to construct a space decomposition such as a quadtree in 2D and an octree in 3D. The query is then answered by traversing the leaves of the tree as they are intersected by the ray, and for each cell in turn, testing for an intersection between the ray and the subset of objects intersecting that cell. In this paper, the only objects we consider are simplices (points and segments inside the unit square
in
, or points, segments and triangles inside the unit cube
in
).
The following cost measure was introduced by Aronov et al. [1] for the purpose of predicting the traversal cost of shooting a ray in
, while using a quadtree (for
) or an octree (for
) to store
:
whereis the set of leaves of the quadtree,
is the set of scene objects meeting a leaf
, and
is the perimeter (if
) or surface area (if
) of
. The coefficient
depends on the implementation, and models the ratio of the cost of the tree traversal (per cell) to that of a ray-object intersection test (per test).
When
is fixed, we simply denote the cost by
. If we assume the cost of finding the neighboring cell meet by a ray is bounded by
, then this cost function provably models the cost of finding all the objects intersected by a random line, with respect to a rigid-motion invariant distribution of lines [1].
We wish to construct trees with as low a cost as possible. We first give a lower bound on the infimum
of the cost of any quadtree, for any given
. We then examine several algorithms which do, or don't, give guaranteed optimal cost, or bounded approximation ratio. Our main result is that the
-lookahead greedy algorithm (introduced below) produces quadtrees with cost
both for points and for segments.
References