Axis-aligned bounding box 2026-10-14
An axis-aligned bounding box is a Cartesian product of closed intervals aligned with a chosen Cartesian coordinate system:Only the two opposite corners and need to be stored. In two dimensions it is a rectangle. Changing the Cartesian coordinate system can change how tightly the axis-aligned bounding box fits the same object.[ref]
For a nonempty finite set of points , the smallest such axis-aligned bounding box hasThese minimum and maximum values also enclose the convex hull of : each coordinate of a convex combination lies between the smallest and largest input coordinates. In particular, three vertices of a polygon determine the axis-aligned bounding box of a filled triangle. For a general nonempty compact set, the same formulas use all its points; inspecting only an arbitrary finite sample is insufficient.
Given nonempty boxes and , the closed interval convention givesEquivalently, reject as soon as or in any coordinate. The surviving set intersection has endpoints and . This is an exact box test, while its conclusion about enclosed objects remains a conservative enclosure test.[ref]
3.7 Bounding Boxes. §3.7, Intersect() and Overlaps(): coordinate-wise intersection and inclusive comparisons
Equality counts as touching: and share an edge, so their set intersection is nonempty. Replacing every in the overlap formula by tests intersection of the interiors of full-dimensional boxes and excludes this contact. A zero-width closed interval can represent a point or a lower-dimensional enclosure, and must not automatically be discarded when touching counts. A box with some is empty; test emptiness before applying rules intended for nonempty boxes. The broad phase must retain touching candidates whenever the narrow phase counts touching as a hit.
For nonempty boxes, the smallest enclosing axis-aligned bounding box of their set union isThis operation supplies the parent boxes in a bounding volume hierarchy. It is an enclosure of the set union, rather than generally the set union itself. In floating-point arithmetic, comparisons are conclusive only for endpoints that still enclose the intended exact objects; use certified bounds such as interval arithmetic with outward rounding when that guarantee is required.
// Target: analysis.bigb
Bounding volume 2026-10-14
A bounding volume is a simple enclosing set for an object : every point of belongs to . Its purpose is to make a cheap rejection possible before examining the object itself. For example, an axis-aligned bounding box can enclose a triangle using just its smallest and largest coordinates.
The guarantee is one-sided. If and , thenThus an empty set intersection of the bounding volumes certifies an empty set intersection of the objects. An overlap of the bounding volumes is necessary for actual intersection, but does not prove it. This is a conservative enclosure test: rejection is conclusive, acceptance means further examination is needed.
Consider the filled triangles with vertices of a polygon and with vertices of a polygon . Their axis-aligned bounding boxes overlap in . Nevertheless, every point of satisfies , whereas every point of satisfies . The two triangles are disjoint. The shaded square in the bounding volume hierarchy illustration makes this false candidate visible.
For collision detection, a broad phase produces possible object pairs from bounding volume tests; a narrow phase examines the actual shapes, for example with a triangle-triangle intersection algorithm. Scott Le Grand's Chapter 32. Broad-Phase Collision Detection with CUDA explains this separation in its opening paragraphs. Whether touching counts as a collision must be specified by the application.
An enclosure must cover the entire object being queried. A box fitted to samples of a parametric curve only guarantees enclosure of the sampled points, unless a separate bound covers the whole parametric curve. For a Bézier curve, the convex hull of its control points provides such a bound on its defining parameter interval. In floating-point arithmetic, outward rounding can preserve certified coordinate bounds; an inward roundoff error can invalidate a rejection. Bounds must also be updated when objects move.
Interval arithmetic 2026-10-14
Interval arithmetic calculates with closed intervals that contain the possible values of a quantity. If all we know is , an interval enclosure for a function must contain for every allowed . The result says what is guaranteed, including uncertainty in the input and, with outward rounding, roundoff error in the calculation. A wide answer can still be correct; a narrow answer is useful only if it contains every possible value.
The attraction is that a finite calculation can make a statement about infinitely many real numbers at once. An interval enclosure can certify that a function stays positive throughout a whole closed interval, or bound its maximum for mathematical optimization. For example, on , the actual image of a function for is , but direct interval arithmetic gives the wider . Interval subdivision and the interval square range improve this answer in different ways.
Historically, Ramon E. Moore's 1962 Stanford dissertation studied interval arithmetic and automatic error analysis in digital computing; his book Interval Analysis followed in 1966. Eldon Hansen's account documents earlier reports as well: these dates describe important steps in developing and disseminating the subject, rather than a claim of sole invention in a particular year.[ref]
https://interval.louisiana.edu/Moores_early_papers/bibliography.html. Eldon R. Hansen, Publications Related to Early Interval Work of R. E. Moore, 2001, references 5 and 8
Moore, R. Baker Kearfott and Michael J. Cloud later wrote Introduction to Interval Analysis (2009).[ref]https://interval.louisiana.edu/books.html. R. Baker Kearfott, Books written or edited, entry for Introduction to Interval Analysis
Interval arithmetic operations 2026-10-14
For closed intervals and , exact addition, subtraction and multiplication giveThese interval arithmetic operations describe all results for in the Cartesian product : the two inputs are allowed to vary independently. Independence here means freedom to choose either input anywhere in its closed interval; it does not assert anything about probability. For example, and .
All four endpoint products matter when signs change. For and , the endpoint products are , so . Taking just and , even after sorting them, would give and lose valid negative products.
For division, if , the multiplicative inverse gives and . Thus . This ordinary finite-closed interval rule requires a denominator that excludes zero. When the denominator contains zero, division is undefined for some pairs and can become unbounded near zero; these formulas cannot supply a finite interval enclosure of all quotients. The operations above use exact endpoints; a computer implementation must also apply outward rounding.
Outward rounding 2026-10-14
Outward rounding replaces an exact lower endpoint by a representable value no larger than it, and an exact upper endpoint by a representable value no smaller than it. This preserves an interval enclosure under floating-point arithmetic. In the binary numeral system, most rational numbers cannot be represented exactly with finitely many digits, so the rounding direction is essential even for elementary calculations. Rump explains directed rounding and its use in interval bounds in §§4 and 5.3 of his survey.[ref]
https://www.tuhh.de/ti3/paper/rump/Ru10.pdf. Siegfried M. Rump, Verification methods: rigorous results using floating-point arithmetic, Acta Numerica 19, 287–449, 2010, §§4 and 5.3
To see the issue without long binary digit strings, use an illustrative decimal grid with step . Exact interval division gives . Rounding both endpoints to the nearest grid value gives , which excludes the true answer because . Outward rounding instead givesThis decimal toy illustrates the rule; its displayed endpoints are not the results of binary directed rounding. Real implementations need valid outward rounding throughout the calculation, including input conversion and intermediate interval arithmetic operations; rounding only the final output cannot repair an earlier lost bound. INTLAB's tutorial demonstrates why decimal input strings and previously rounded intermediate values need care.[ref]
https://www.tuhh.de/ti3/rump/intlab/demos/html/dintval.html. Rump, Interval computations in INTLAB, How to define an interval II and Invoking interval operations
Outward rounding encloses one third on a decimal toy grid; sign-changing interval products require all four endpoint combinations
. Above: rounding to the nearest decimal grid point misses , while down to and up to enclose it. Below: the Cartesian product of and has endpoint products , giving . The two same-side endpoint products alone give the invalid enclosure . Details.