Minimum bounding box algorithms

Last updated

In computational geometry, the smallest enclosing box problem is that of finding the oriented minimum bounding box enclosing a set of points. It is a type of bounding volume. "Smallest" may refer to volume, area, perimeter, etc. of the box.

Contents

It is sufficient to find the smallest enclosing box for the convex hull of the objects in question. It is straightforward to find the smallest enclosing box that has sides parallel to the coordinate axes; the difficult part of the problem is to determine the orientation of the box.

Two dimensions

For the convex polygon, a linear time algorithm for the minimum-area enclosing rectangle is known. It is based on the observation that a side of a minimum-area enclosing box must be collinear with a side of the convex polygon. [1] It is possible to enumerate boxes of this kind in linear time with the approach called rotating calipers by Godfried Toussaint in 1983. [2] The same approach is applicable for finding the minimum-perimeter enclosing rectangle. [2] A C++ implementation of the algorithm that is robust against floating point errors is available. [3]

Three dimensions

In 1985, Joseph O'Rourke published a cubic-time algorithm to find the minimum-volume enclosing box of a 3-dimensional point set. O'Rourke's approach uses a 3-dimensional rotating calipers technique, and is based on lemmas characterizing the minimum enclosing box:

It follows in the most general case where no convex hull vertices lie in edges of the minimal enclosing box, that at least 8 convex hull points must lie within faces of the box: two endpoints of each of the two edges, and four more points, one for each of the remaining four box faces. Conversely, if the convex hull consists of 7 or fewer vertices, at least one of them must lie within an edge of the hull's minimal enclosing box. [4]

It is also possible to approximate the minimum bounding box volume, to within any constant factor greater than one, in linear time. The algorithm for doing this involves finding an approximation to the diameter of the point set, and using a box oriented towards this diameter as an initial approximation to the minimum volume bounding box. Then, this initial bounding box is partitioned into a grid of smaller cubes, and grid points near the boundary of the convex hull of the input are used as a coreset, a small set of points whose optimum bounding box approximates the optimum bounding box of the original input. Finally, O'Rourke's algorithm is applied to find the exact optimum bounding box of this coreset. [5]

A Matlab implementation of the algorithm is available. [6]

The minimum bounding box of a regular tetrahedron Tetraeder animation with cube.gif
The minimum bounding box of a regular tetrahedron

The minimal enclosing box of the regular tetrahedron is a cube, with side length 1/2 that of the tetrahedron; for instance, a regular tetrahedron with side length 2 fits into a unit cube, with the tetrahedron's vertices lying at the vertices (0,0,0), (0,1,1), (1,0,1) and (1,1,0) of the unit cube. [7]

See also

Related Research Articles

<span class="mw-page-title-main">Delaunay triangulation</span> Triangulation method

In mathematics and computational geometry, a Delaunay triangulation for a given set P of discrete points in a general position is a triangulation DT(P) such that no point in P is inside the circumcircle of any triangle in DT(P). Delaunay triangulations maximize the minimum of all the angles of the triangles in the triangulation; they tend to avoid sliver triangles. The triangulation is named after Boris Delaunay for his work on this topic from 1934.

<span class="mw-page-title-main">Polyhedron</span> 3D shape with flat faces, straight edges and sharp corners

In geometry, a polyhedron is a three-dimensional shape with flat polygonal faces, straight edges and sharp corners or vertices.

<span class="mw-page-title-main">Convex hull</span> Smallest convex set containing a given set

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, or equivalently as the set of all convex combinations of points in the subset. For a bounded subset of the plane, the convex hull may be visualized as the shape enclosed by a rubber band stretched around the subset.

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 are also considered to be part of computational geometry. While modern computational geometry is a recent development, it is one of the oldest fields of computing with a history stretching back to antiquity.

<span class="mw-page-title-main">Circumscribed sphere</span> Sphere touching all of a polyhedrons vertices

In geometry, a circumscribed sphere of a polyhedron is a sphere that contains the polyhedron and touches each of the polyhedron's vertices. The word circumsphere is sometimes used to mean the same thing, by analogy with the term circumcircle. As in the case of two-dimensional circumscribed circles (circumcircles), the radius of a sphere circumscribed around a polyhedron P is called the circumradius of P, and the center point of this sphere is called the circumcenter of P.

<span class="mw-page-title-main">Heilbronn triangle problem</span> On point sets with no small-area triangles

In discrete geometry and discrepancy theory, the Heilbronn triangle problem is a problem of placing points in the plane, avoiding triangles of small area. It is named after Hans Heilbronn, who conjectured that, no matter how points are placed in a given area, the smallest triangle area will be at most inversely proportional to the square of the number of points. His conjecture was proven false, but the asymptotic growth rate of the minimum triangle area remains unknown.

<span class="mw-page-title-main">Simple polygon</span> Flat shape consisting of straight, non-intersecting lines

In geometry, a simple polygon is a polygon that does not intersect itself and has no holes. That is, it is a flat shape consisting of straight, non-intersecting line segments or "sides" that are joined pairwise to form a single closed path. If the sides intersect then the polygon is not simple. The qualifier "simple" is frequently omitted, with the above definition then being understood to define a polygon in general.

<span class="mw-page-title-main">Point-set triangulation</span>

A triangulation of a set of points in the Euclidean space is a simplicial complex that covers the convex hull of , and whose vertices belong to . In the plane, triangulations are made up of triangles, together with their edges and vertices. Some authors require that all the points of are vertices of its triangulations. In this case, a triangulation of a set of points in the plane can alternatively be defined as a maximal set of non-crossing edges between points of . In the plane, triangulations are special cases of planar straight-line graphs.

<span class="mw-page-title-main">Convex polytope</span> Convex hull of a finite set of points in a Euclidean space

A convex polytope is a special case of a polytope, having the additional property that it is also a convex set contained in the -dimensional Euclidean space . Most texts use the term "polytope" for a bounded convex polytope, and the word "polyhedron" for the more general, possibly unbounded object. Others allow polytopes to be unbounded. The terms "bounded/unbounded convex polytope" will be used below whenever the boundedness is critical to the discussed issue. Yet other texts identify a convex polytope with its boundary.

Proximity problems is a class of problems in computational geometry which involve estimation of distances between geometric objects.

Algorithms that construct convex hulls of various objects have a broad range of applications in mathematics and computer science.

<span class="mw-page-title-main">Minimum bounding box</span> Smallest box which encloses some set of points

In geometry, the minimum or smallest bounding or enclosing box for a point set S in N dimensions is the box with the smallest measure within which all the points lie. When other kinds of measure are used, the minimum box is usually called accordingly, e.g., "minimum-perimeter bounding box".

<span class="mw-page-title-main">Smallest-circle problem</span> Finding the smallest circle that contains all given points

The smallest-circle problem is a mathematical problem of computing the smallest circle that contains all of a given set of points in the Euclidean plane. The corresponding problem in n-dimensional space, the smallest bounding sphere problem, is to compute the smallest n-sphere that contains all of a given set of points. The smallest-circle problem was initially proposed by the English mathematician James Joseph Sylvester in 1857.

<span class="mw-page-title-main">Rotating calipers</span>

In computational geometry, the method of rotating calipers is an algorithm design technique that can be used to solve optimization problems including finding the width or diameter of a set of points.

<span class="mw-page-title-main">Prince Rupert's cube</span> Cube that fits through hole in smaller cube

In geometry, Prince Rupert's cube is the largest cube that can pass through a hole cut through a unit cube without splitting it into two pieces. Its side length is approximately 1.06, 6% larger than the side length 1 of the unit cube through which it passes. The problem of finding the largest square that lies entirely within a unit cube is closely related, and has the same solution.

<span class="mw-page-title-main">Opaque set</span> Shape that blocks all lines of sight

In discrete geometry, an opaque set is a system of curves or other set in the plane that blocks all lines of sight across a polygon, circle, or other shape. Opaque sets have also been called barriers, beam detectors, opaque covers, or opaque forests. Opaque sets were introduced by Stefan Mazurkiewicz in 1916, and the problem of minimizing their total length was posed by Frederick Bagemihl in 1959.

In geometry, a covering of a polygon is a set of primitive units whose union equals the polygon. A polygon covering problem is a problem of finding a covering with a smallest number of units for a given polygon. This is an important class of problems in computational geometry. There are many different polygon covering problems, depending on the type of polygon being covered. An example polygon covering problem is: given a rectilinear polygon, find a smallest set of squares whose union equals the polygon.

In geometry, a partition of a polygon is a set of primitive units, which do not overlap and whose union equals the polygon. A polygon partition problem is a problem of finding a partition which is minimal in some sense, for example a partition with a smallest number of units or with units of smallest total side-length.

<span class="mw-page-title-main">Polygonalization</span> Polygon through a set of points

In computational geometry, a polygonalization of a finite set of points in the Euclidean plane is a simple polygon with the given points as its vertices. A polygonalization may also be called a polygonization, simple polygonalization, Hamiltonian polygon, non-crossing Hamiltonian cycle, or crossing-free straight-edge spanning cycle.

References

  1. Freeman, H.; Shapira, R. (1975), "Determining the minimum-area encasing rectangle for an arbitrary closed curve", Communications of the ACM , 18 (7): 409–413, doi:10.1145/360881.360919, MR   0375828, S2CID   2079688 .
  2. 1 2 Toussaint, G. T (1983), "Solving geometric problems with the rotating calipers" (PDF), Proc. MELECON '83, Athens.
  3. Eberly, D. (2015), "Minimum-area rectangle containing a set of points", Geometric Tools, LLC.
  4. O'Rourke, Joseph (1985), "Finding minimal enclosing boxes", International Journal of Computer and Information Sciences, 14 (3): 183–199, doi:10.1007/BF00991005, MR   0824371, S2CID   8311538 .
  5. Barequet, Gill; Har-Peled, Sariel (2001), "Efficiently approximating the minimum-volume bounding box of a point set in three dimensions", Journal of Algorithms, 38 (1): 91–109, doi:10.1006/jagm.2000.1127, MR   1810433, S2CID   1542799 .
  6. Melchior, Samuel (2018). "Matlab implementation of the minimum-volume bounding box algorithm". GitHub ..
  7. O'Rourke (1985), Fig. 1, p. 186.