Bounding Cylinder
   HOME

TheInfoList



OR:

In
computer graphics Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great de ...
and
computational geometry Computational geometry is a branch of computer science devoted to the study of algorithms which can be stated in terms of geometry. Some purely geometrical problems arise out of the study of computational geometric algorithms, and such problems ar ...
, a bounding volume for a set of objects is a closed volume that completely contains the
union Union commonly refers to: * Trade union, an organization of workers * Union (set theory), in mathematics, a fundamental operation on sets Union may also refer to: Arts and entertainment Music * Union (band), an American rock group ** ''Un ...
of the objects in the set. Bounding volumes are used to improve the efficiency of geometrical operations by using simple volumes to contain more complex objects. Normally, simpler volumes have simpler ways to test for overlap. A bounding volume for a set of objects is also a bounding volume for the single object consisting of their union, and the other way around. Therefore, it is possible to confine the description to the case of a single object, which is assumed to be non-empty and bounded (finite).


Uses

Bounding volumes are most often used to accelerate certain kinds of tests. In ray tracing, bounding volumes are used in ray-intersection tests, and in many
rendering algorithm Rendering or image synthesis is the process of generating a photorealistic or non-photorealistic image from a 2D or 3D model by means of a computer program. The resulting image is referred to as the render. Multiple models can be defined ...
s, they are used for
viewing frustum In 3D computer graphics, the view frustum (also called viewing frustum) is the region of space in the modeled world that may appear on the screen; it is the field of view of a perspective virtual camera system. The view frustum is typically ...
tests. If the ray or viewing frustum does not intersect the bounding volume, it cannot intersect the object contained within, allowing trivial rejection. Similarly if the frustum contains the entirety of the bounding volume, the contents may be trivially accepted without further tests. These intersection tests produce a list of objects that must be 'displayed' (rendered;
rasterized In computer graphics, rasterisation (British English) or rasterization (American English) is the task of taking an Digital image, image described in a vector graphics format (shapes) and converting it into a raster image (a series of pixels, dots ...
). In
collision detection Collision detection is the computational problem of detecting the intersection (Euclidean geometry), intersection of two or more objects. Collision detection is a classic issue of computational geometry and has applications in various computing ...
, when two bounding volumes do not intersect, the contained objects cannot collide. Testing against a bounding volume is typically much faster than testing against the object itself, because of the bounding volume's simpler geometry. This is because an 'object' is typically composed of polygons or data structures that are reduced to polygonal approximations. In either case, it is computationally wasteful to test each polygon against the view volume if the object is not visible. (Onscreen objects must be 'clipped' to the screen, regardless of whether their surfaces are actually visible.) To obtain bounding volumes of complex objects, a common way is to break the objects/scene down using a
scene graph Scene (from Greek σκηνή ''skēnḗ'') may refer to: Arts, entertainment, and media Music *Scene (subculture), a youth subculture from the early 2000s characterized by a distinct music and style. Groups and performers * The Scene who recor ...
or more specifically a
bounding volume hierarchy A bounding volume hierarchy (BVH) is a tree structure on a set of geometric objects. All geometric objects, that form the leaf nodes of the tree, are wrapped in bounding volumes. These nodes are then grouped as small sets and enclosed within la ...
, like e.g. OBB trees. The basic idea behind this is to organize a scene in a tree-like structure where the root comprises the whole scene and each leaf contains a smaller subpart. In
computer stereo vision Computer stereo vision is the extraction of 3D information from digital images, such as those obtained by a CCD camera. By comparing information about a scene from two vantage points, 3D information can be extracted by examining the relative positi ...
, a bounding volume reconstructed from silhouettes of an object is known as a "
visual hull A visual hull is a geometric entity created by shape-from-silhouette 3D reconstruction technique introduced by A. Laurentini. This technique assumes the foreground object in an image can be separated from the background. Under this assumption, ...
."


Common types

The choice of the type of bounding volume for a given application is determined by a variety of factors: the computational cost of computing a bounding volume for an object, the cost of updating it in applications in which the objects can move or change shape or size, the cost of determining intersections, and the desired precision of the intersection test. The precision of the intersection test is related to the amount of space within the bounding volume not associated with the bounded object, called ''void space''. Sophisticated bounding volumes generally allow for less void space but are more computationally expensive. It is common to use several types in conjunction, such as a cheap one for a quick but rough test in conjunction with a more precise but also more expensive type. The types treated here all give
convex Convex or convexity may refer to: Science and technology * Convex lens, in optics Mathematics * Convex set, containing the whole line segment that joins points ** Convex polygon, a polygon which encloses a convex set of points ** Convex polytope ...
bounding volumes. If the object being bounded is known to be convex, this is not a restriction. If non-convex bounding volumes are required, an approach is to represent them as a union of a number of convex bounding volumes. Unfortunately, intersection tests become quickly more expensive as the bounding boxes become more sophisticated. A is a
cuboid In geometry, a cuboid is a hexahedron, a six-faced solid. Its faces are quadrilaterals. Cuboid means "like a cube", in the sense that by adjusting the length of the edges or the angles between edges and faces a cuboid can be transformed into a cub ...
, or in 2-D a
rectangle In Euclidean plane geometry, a rectangle is a quadrilateral with four right angles. It can also be defined as: an equiangular quadrilateral, since equiangular means that all of its angles are equal (360°/4 = 90°); or a parallelogram containi ...
, containing the object. In
dynamical simulation Dynamical simulation, in computational physics, is the simulation of systems of objects that are free to move, usually in three dimensions according to Newton's laws of dynamics, or approximations thereof. Dynamical simulation is used in computer ...
, bounding boxes are preferred to other shapes of bounding volume such as
bounding sphere In mathematics, given a non-empty set of objects of finite extension in d-dimensional space, for example a set of points, a bounding sphere, enclosing sphere or enclosing ball for that set is an d-dimensional solid sphere containing all of thes ...
s or
cylinders A cylinder (from ) has traditionally been a three-dimensional solid, one of the most basic of curvilinear geometric shapes. In elementary geometry, it is considered a prism with a circle as its base. A cylinder may also be defined as an infini ...
for objects that are roughly cuboid in shape when the intersection test needs to be fairly accurate. The benefit is obvious, for example, for objects that rest upon other, such as a car resting on the ground: a bounding sphere would show the car as possibly intersecting with the ground, which then would need to be rejected by a more expensive test of the actual model of the car; a bounding box immediately shows the car as not intersecting with the ground, saving the more expensive test. In many applications the bounding box is aligned with the axes of the co-ordinate system, and it is then known as an axis-aligned bounding box (). To distinguish the general case from an AABB, an arbitrary bounding box is sometimes called an oriented bounding box (), or an when an existing object's
local coordinate system In mathematics, particularly topology, one describes a manifold using an atlas. An atlas consists of individual ''charts'' that, roughly speaking, describe individual regions of the manifold. If the manifold is the surface of the Earth, then an a ...
is used. AABBs are much simpler to test for intersection than OBBs, but have the disadvantage that when the model is rotated they cannot be simply rotated with it, but need to be recomputed. A is a
swept sphere Sweep or swept may refer to: Cleaning * Sweep, the action of using a brush to clean * Chimney sweep, a worker who clears ash and soot from chimneys * Street sweeper, a person's occupation, or a machine that cleans streets * Swept quartz, a clean ...
(i.e. the volume that a sphere takes as it moves along a straight line segment) containing the object. Capsules can be represented by the radius of the swept sphere and the segment that the sphere is swept across). It has traits similar to a cylinder, but is easier to use, because the intersection test is simpler. A capsule and another object intersect if the distance between the capsule's defining segment and some feature of the other object is smaller than the capsule's radius. For example, two capsules intersect if the distance between the capsules' segments is smaller than the sum of their radii. This holds for arbitrarily rotated capsules, which is why they're more appealing than cylinders in practice. A is a
cylinder A cylinder (from ) has traditionally been a three-dimensional solid, one of the most basic of curvilinear geometric shapes. In elementary geometry, it is considered a prism with a circle as its base. A cylinder may also be defined as an infin ...
containing the object. In most applications the axis of the cylinder is aligned with the vertical direction of the scene. Cylinders are appropriate for 3-D objects that can only rotate about a vertical axis but not about other axes, and are otherwise constrained to move by translation only. Two vertical-axis-aligned cylinders intersect when, simultaneously, their projections on the vertical axis intersect – which are two line segments – as well their projections on the horizontal plane – two circular disks. Both are easy to test. In
video game Video games, also known as computer games, are electronic games that involves interaction with a user interface or input device such as a joystick, controller, keyboard, or motion sensing device to generate visual feedback. This fee ...
s, bounding cylinders are often used as bounding volumes for people standing upright. A is an
ellipsoid An ellipsoid is a surface that may be obtained from a sphere by deforming it by means of directional scalings, or more generally, of an affine transformation. An ellipsoid is a quadric surface;  that is, a surface that may be defined as the ...
containing the object. Ellipsoids usually provide tighter fitting than a sphere. Intersections with ellipsoids are done by scaling the other object along the principal axes of the ellipsoid by an amount equal to the
multiplicative inverse In mathematics, a multiplicative inverse or reciprocal for a number ''x'', denoted by 1/''x'' or ''x''−1, is a number which when Multiplication, multiplied by ''x'' yields the multiplicative identity, 1. The multiplicative inverse of a rat ...
of the radii of the ellipsoid, thus reducing the problem to intersecting the scaled object with a
unit sphere In mathematics, a unit sphere is simply a sphere of radius one around a given center. More generally, it is the set of points of distance 1 from a fixed central point, where different norms can be used as general notions of "distance". A unit b ...
. Care should be taken to avoid problems if the applied scaling introduces
skew Skew may refer to: In mathematics * Skew lines, neither parallel nor intersecting. * Skew normal distribution, a probability distribution * Skew field or division ring * Skew-Hermitian matrix * Skew lattice * Skew polygon, whose vertices do not ...
. Skew can make the usage of ellipsoids impractical in certain cases, for example collision between two arbitrary ellipsoids. A is a
sphere A sphere () is a Geometry, geometrical object that is a solid geometry, three-dimensional analogue to a two-dimensional circle. A sphere is the Locus (mathematics), set of points that are all at the same distance from a given point in three ...
containing the object. In 2-D graphics, this is a
circle A circle is a shape consisting of all points in a plane that are at a given distance from a given point, the centre. Equivalently, it is the curve traced out by a point that moves in a plane so that its distance from a given point is const ...
. Bounding spheres are represented by centre and radius. They are very quick to test for collision with each other: two spheres intersect when the distance between their centres does not exceed the sum of their radii. This makes bounding spheres appropriate for objects that can move in any number of dimensions. A is the volume that projects to an extent on an axis, and can be thought of as the
slab Slab or SLAB may refer to: Physical materials * Concrete slab, a flat concrete plate used in construction * Stone slab, a flat stone used in construction * Slab (casting), a length of metal * Slab (geology), that portion of a tectonic plate that i ...
bounded between two planes. A bounding box is the intersection of orthogonally oriented bounding slabs. Bounding slabs have been used to speed up ray tracing A in 2-D is quite useful to speedup the clipping or visibility test of a B-Spline curve. See "Circle and B-Splines clipping algorithms" under the subject Clipping (computer graphics) for an example of use. A
convex hull In geometry, the convex hull or convex envelope or convex closure of a shape is the smallest convex set that contains it. The convex hull may be defined either as the intersection of all convex sets containing a given subset of a Euclidean space ...
is the smallest convex volume containing the object. If the object is the union of a finite set of points, its convex hull is a polytope. A (DOP) generalizes the bounding box. A k-DOP is the Boolean intersection of extents along ''k'' directions. Thus, a ''k''-DOP is the Boolean intersection of ''k'' bounding slabs and is a convex
polytope In elementary geometry, a polytope is a geometric object with flat sides (''faces''). Polytopes are the generalization of three-dimensional polyhedra to any number of dimensions. Polytopes may exist in any general number of dimensions as an -d ...
containing the object (in 2-D a
polygon In geometry, a polygon () is a plane figure that is described by a finite number of straight line segments connected to form a closed ''polygonal chain'' (or ''polygonal circuit''). The bounded plane region, the bounding circuit, or the two toge ...
; in 3-D a
polyhedron In geometry, a polyhedron (plural polyhedra or polyhedrons; ) is a three-dimensional shape with flat polygonal faces, straight edges and sharp corners or vertices. A convex polyhedron is the convex hull of finitely many points, not all on th ...
). A 2-D rectangle is a special case of a 2-DOP, and a 3-D box is a special case of a 3-DOP. In general, the axes of a DOP do not have to be orthogonal, and there can be more axes than dimensions of space. For example, a 3-D box that is beveled on all edges and corners can be constructed as a 13-DOP. The actual number of faces can be less than 2 times ''k'' if some faces become degenerate, shrunk to an edge or a vertex. A
minimum bounding rectangle In computational geometry, the minimum bounding rectangle (MBR), also known as bounding box (BBOX) or envelope, is an expression of the maximum extents of a two-dimensional object (e.g. point, line, polygon) or set of objects within its coordina ...
or MBR – the least AABB in 2-D – is frequently used in the description of geographic (or "geospatial") data items, serving as a simplified proxy for a dataset's spatial extent (see
geospatial metadata Geospatial metadata (also geographic metadata) is a type of metadata applicable to geographic data and information. Such objects may be stored in a geographic information system (GIS) or may simply be documents, data-sets, images or other objects, ...
) for the purpose of data search (including spatial queries as applicable) and display. It is also a basic component of the
R-tree R-trees are tree data structures used for spatial access methods, i.e., for indexing multi-dimensional information such as geographical coordinates, rectangles or polygons. The R-tree was proposed by Antonin Guttman in 1984 and has found sign ...
method of
spatial index A spatial database is a general-purpose database (usually a relational database) that has been enhanced to include spatial data that represents objects defined in a geometric space, along with tools for querying and analyzing such data. Most spa ...
ing.


Basic intersection checks

For some types of bounding volume (OBB and convex polyhedra), an effective check is that of the
separating axis theorem In geometry, the hyperplane separation theorem is a theorem about disjoint convex sets in ''n''-dimensional Euclidean space. There are several rather similar versions. In one version of the theorem, if both these sets are closed and at least on ...
. The idea here is that, if there exists an axis by which the objects do not overlap, then the objects do not intersect. Usually the axes checked are those of the basic axes for the volumes (the unit axes in the case of an AABB, or the 3 base axes from each OBB in the case of OBBs). Often, this is followed by also checking the cross-products of the previous axes (one axis from each object). In the case of an AABB, this tests becomes a simple set of overlap tests in terms of the unit axes. For an ''AABB'' defined by ''M'',''N'' against one defined by ''O'',''P'' they do not intersect if (''M''''x'' > ''P''''x'') or (''O''''x'' > ''N''''x'') or (''M''''y'' > ''P''''y'') or (''O''''y'' > ''N''''y'') or (''M''''z'' > ''P''''z'') or (''O''''z'' > ''N''''z''). An AABB can also be projected along an axis, for example, if it has edges of length L and is centered at ''C'', and is being projected along the axis N:
r = 0.5L_x, N_x, +0.5L_y, N_y, +0.5L_z, N_z, \,, and b=C*N\, or b=C_x N_x +C_y N_y+C_z N_z\,, and m=b-r, n=b+r\, where m and n are the minimum and maximum extents. An OBB is similar in this respect, but is slightly more complicated. For an OBB with L and C as above, and with ''I'', ''J'', and ''K'' as the OBB's base axes, then: : r = 0.5L_x, N*I, +0.5L_y, N*J, +0.5L_z, N*K, \, : m=C*N-r \mbox n=C*N+r\, For the ranges ''m'',''n'' and ''o'',''p'' it can be said that they do not intersect if ''m'' > ''p'' or ''o'' > ''n''. Thus, by projecting the ranges of 2 OBBs along the I, J, and K axes of each OBB, and checking for non-intersection, it is possible to detect non-intersection. By additionally checking along the cross products of these axes (I0×I1, I0×J1, ...) one can be more certain that intersection is impossible. This concept of determining non-intersection via use of axis projection also extends to convex polyhedra, however with the normals of each polyhedral face being used instead of the base axes, and with the extents being based on the minimum and maximum dot products of each vertex against the axes. Note that this description assumes the checks are being done in world space. The intersection of two ''k''-DOP's can be computed very similarly to AABBs: for each orientation, you just check the two corresponding intervals of the two DOP's. So, just like DOP's being a generalization of AABBs, the intersection test is a generalization of the AABB overlap test. The complexity of the overlap test of two DOP's is in . This assumes, however, that both DOP's are given with respect to the same set of orientations. If one of them is rotated, this is no longer true. In that case, one relatively easy way to check the two DOP's D^1, D^2 for intersection is to enclose the rotated one, D^2, by another, smallest enclosing DOP \tilde^2 that is oriented with respect to the orientations of the first DOP D^1. The procedure for that is a little bit more complex, but eventually amounts to a matrix vector multiplication of complexity as well.G. Zachmann: Rapid Collision Detection by Dynamically Aligned DOP-Trees. Proc. of IEEE Virtual Reality Annual International Symposium (VRAIS, now IEEE VR), 1998, pp. 90-97, DOI 10.1109/VRAIS.1998.658428, URL: http://cgvr.informatik.uni-bremen.de/papers/vrais98/vrais98.pdf


See also

*
Bounding sphere In mathematics, given a non-empty set of objects of finite extension in d-dimensional space, for example a set of points, a bounding sphere, enclosing sphere or enclosing ball for that set is an d-dimensional solid sphere containing all of thes ...
*
Convex hull algorithms Algorithms that construct convex hulls of various objects have a broad range of applications in mathematics and computer science. In computational geometry, numerous algorithms are proposed for computing the convex hull of a finite set of points ...
*
Minimum bounding box In geometry, the minimum or smallest bounding or enclosing box for a point set in dimensions is the box with the smallest measure (area, volume, or hypervolume in higher dimensions) within which all the points lie. When other kinds of measure a ...
*
Minimum bounding rectangle In computational geometry, the minimum bounding rectangle (MBR), also known as bounding box (BBOX) or envelope, is an expression of the maximum extents of a two-dimensional object (e.g. point, line, polygon) or set of objects within its coordina ...
*
Spatial index A spatial database is a general-purpose database (usually a relational database) that has been enhanced to include spatial data that represents objects defined in a geometric space, along with tools for querying and analyzing such data. Most spa ...


References

{{reflist


External links


Illustration of several DOPs for the same model, from epicgames.com
Geometric algorithms 3D computer graphics