Graphics Reference
In-Depth Information
Figure 6.2.
Bounding slabs.
Definition. The generalized bounding box for X determined by a fixed set, n 1 , n 2 ,
..., n k , of unit vectors is the intersection of the slabs that they determine. More
precisely, if we denote this set by B( X , n 1 , n 2 ,..., n k ), then
k
(
)
(
)
B
Xn n
,
,
,...,
n
Slab
Xn
,
.
(6.1)
12
k
i
i
=
1
See Figure 6.2(b). These parallelopiped-type boxes were introduced by [KayK86]. It
turns out that they are not much more complicated to work with than simple boxes.
First of all, we show how the generalized bounding boxes are determined for three
different types of objects in R 3 . Note that all we have to find is the d near and d far .
Linear Polyhedra. In this case we project all of its vertices p j onto the n i and use
the minimum and maximum of those values, that is,
near
far
{
}
{
}
d
=
min
np
and
d
=
max
np
.
(6.2)
i
i
j
i
i
j
j
j
Implicitly Defined Surfaces.
Assume that a surface S is defined by an equation
(
) = 0
fxyz
,,
.
The d i near
and d i far
will be the minimum and maximum, respectively, of the linear
function
(
) =
(
)
gxyz
,,
n
• ,,
xyz
i
subject to the constraint above. These values can be solved for using the method of
Lagrange multipliers.
Compound Objects. Assume that an object is defined by successive application of
the operations of union, intersection, and difference of two objects starting with prim-
itive objects of the type above. The d near
and d far
of the result is easily computed in
Search WWH ::




Custom Search