Overview
In implementing computer graphics algorithms, we frequently need a low-cost method to ``keep track of'' an object without having to continually reference the object's mathematical complex definition. In many cases, a bounding box can be placed about the object and the algorithms can refer to the box when necessary, rather than the object.
For a pdf version of these notes look
here.
What is a Bounding Box?
A bounding box for an object is just a rectangular box in three-dimensional space, with sides parallel to the coordinate planes, that contains (or surrounds) the object. This illustration below shows a two-dimensional box surrounding a curved object.
How Do We Construct Bounding Boxes?
If we are given an object represented by a set of points
In Relation to the Convex Hull ...
If we consider the above points
,
the bounding box is a convex set containing the points.
Since we know that the convex hull
is the smallest convex set
that contains all the points, it must also be contained in the
bounding box. That is, a bounding box contains the convex
hull.
A Simple Intersection Test
If we have two complex models
and
and we wish
to see if these models do not intersect, we can use a
``bounding-box test'' to give a quick initial answer. If
and
are bounding boxes containing
and
respectively, it is easily seen that
and
cannot intersect if the two bounding boxes do not
intersect.
This test can only be used to see if the objects do not intersect, it cannot be used to test for intersection. If the bounding boxes do intersect, we can only say that it is possible that the objects intersect. We cannot say it with certainty.
A Ray/Object Intersection Test
Suppose we have a complex models
and we wish to see if
a ray intersects
. This is normally a complex
operation, and we can simplify it somewhat by using
a simple ``bounding-box test'' to see if the
ray misses
.
By placing a bounding box
around
,
we first see if the ray hits
, and if not, we know that
the ray does not hit the model
.
Of course, if the ray hits the bounding box, we then must
test it against
for intersection which may be
expensive. But by testing first against the bounding box, we
can eliminate a number of complex expensive calculations.
Return to
the Graphics Notes Home Page
Return
to the Geometric Modeling Notes Home Page
Return
to the UC Davis Visualization and Graphics Group Home Page
This document maintained by Ken Joy
All contents copyright (c) 1996, 1997, 1998,
1999
Computer Science Department
University of California, Davis
All rights reserved.