i
i
i
i
i
i
i
i
736 16. Intersection Test Methods
So for our original question, a 1 ×1 ×1 box has a surface area of 6 and
the 1 × 2 × 3 box has a surface area of 22. Therefore, the second box is
22/6 ≈ 3.67 times as likely to be hit by an arbitrary ray as the first box.
This metric is referred to as the surface area heuristic (SAH) [35, 805,
1314] in the ray tracing literature, as it is important in forming efficient
visibility structures for data sets. One use is in comparing bounding volume
efficiency. For example, a sphere has a relative probability of 1.57 (π/2)
of being hit by a ray, compared to an inscribed cube (i.e., a cube with its
corners touching the sphere). Similarly, a cube has a relative probability
of 1.91 (6/π) of being hit, versus a sphere inscribed inside it.
This type of probability measurement can be useful in areas such as
level of detail computation. For example, imagine a long and thin object
that covers many fewer pixels than a rounder object, yet both have the
same bounding sphere size. Knowing this in advance from the area of its
bounding box, the long and thin object may be assigned a different screen
area for when it changes its level of detail.
It may also be useful to know the relative probability of a plane in-
tersecting one convex object versus another. Similar to surface area, the
chance of a plane intersecting a box is directly proportional to the sum of
the extents of the box in three dimensions [1136]. This sum is called the
object’s mean width. For example, a cube with an edge length of 1 has a
mean width of 1 + 1 + 1 = 3. A box’s mean width is proportional to its
chanceofbeinghitbyaplane.Soa1×1 ×1 box has a measure of 3, and
a1× 2 × 3 box a measure of 6, meaning that the second box is twice as
likely to be intersected by an arbitrary plane.
However, this sum is larger than the true geometric mean width, which
is the average projected length of an object along a fixed axis over the set
of all possible orientations. There is no easy relationship (such as surface
area) among different convex object types for mean width computation. A
sphere of diameter d has a geometric mean width of d, since the sphere
spans this same length for any orientation. We will leave this topic by
simply stating that multiplying the sum of a box’s dimensions (i.e., its
mean width) by 0.5 gives its geometric mean width, which can be compared
directly to a sphere’s diameter. So the 1 × 1 × 1 box with measure 3 has
a geometric mean width of 3 × 0.5=1.5. A sphere bounding this box
has a diameter of
√
3=1.732. Therefore a sphere surrounding a cube is
1.732/1.5=1.155 times as likely to be intersected by an arbitrary plane. It
is worth noting that the best-fitting sphere around an object can in some
cases be smaller than the sphere whose surface encloses all the object’s
bounding box corners.
These relationships are useful for determining the benefits of various
algorithms. Frustum culling is a prime candidate, as it involves intersecting
planes with bounding volumes. The relative benefits of using a sphere