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 has
These 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 gives
Equivalently, 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]
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 is
This 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
A rooted tree whose leaves describe primitive regions and whose internal nodes describe Boolean operations. A half-space leaf can hold an implicit equation and an inside-sign convention. Evaluate membership from the leaves toward the root; interval arithmetic can propagate conservative inside/outside bounds over a box instead of a single point.
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] Moore, R. Baker Kearfott and Michael J. Cloud later wrote Introduction to Interval Analysis (2009).[ref]
The interval dependency problem is the loss of relationships between repeated occurrences of the same input. For , interval subtraction gives : it permits with independent choices . But the function has actual image of a function . Giving both operands the name does not tell an interval arithmetic calculation to enforce .
For the polynomial on , the natural interval extension is
This allows the impossible combination in the first factor and in the second, producing the spurious upper bound . In the actual function, both occurrences use the same . Completing the square gives , which lies between and on ; every value between these bounds occurs, by continuity and the intermediate value theorem. The maximum occurs at , while either endpoint gives the minimum .
Figure 1.
Independent interval inputs lose the diagonal constraint; subdivision tightens the enclosure of x times one minus x
. Left: the Cartesian product permits separate choices , while the actual function uses only . Right: rectangles from four pieces contain the polynomial curve. Below: one, two and four pieces give interval enclosures with upper bounds , and ; the interval square range gives the exact . Details.
Interval enclosure 2026-10-14
An interval enclosure for a real-valued function on a closed interval satisfies
Here means the actual image of a function, also called its pointwise range on ; denotes a calculated interval enclosure. They need not agree. Sampling a few inputs can suggest a bound, but does not establish an interval enclosure between those inputs. Kearfott and coauthors explicitly distinguish the image of a function from evaluating an expression with interval arithmetic, because different expressions for the same function can give different bounds.[ref]
Interval root exclusion 2026-10-14
Interval root exclusion certifies that a function has no zero of a function on when a valid interval enclosure excludes zero. For on , the interval square range yields , which excludes zero. Direct interval arithmetic yields and is inconclusive, even though the function has no zero of a function there.
Knowing only that a calculated interval enclosure contains zero does not certify a zero of a function: it may contain unattainable values. Even the positive constant function has a valid, loose interval enclosure . A separate existence argument, such as reliable opposite endpoint signs together with continuity in the intermediate value theorem, is required; see root bracket and bisection method. Interval subdivision can resolve some inconclusive pieces, but remaining pieces must be reported as unresolved unless an existence argument succeeds. This makes interval root exclusion useful for systematically discarding regions in a search.
// Target: analysis.bigb
The tight axis-aligned bounding box is . Bisect vertically at , giving a right child . For a scalar implicit function representing the same constructive solid geometry solid, use
With the convention inside, set intersection corresponds to the maximum, and set union to the minimum. These operations encode membership; is not a signed distance function.
Since every is an affine function, its extreme values on occur at corners. Exact real-arithmetic interval arithmetic gives:
FunctionRange on , propagated, propagated
Each leaf range is exact, but combining independent intervals forgets that the expressions share . The final enclosure need not be the exact range of . For example, equality would require both , hence , and , hence on , which is impossible. The enclosure is still sufficient for a reliable three-way decision:
Here the result is unresolved. This is a real mixed box, rather than only a pessimistic test: is strictly inside, whereas is outside. A zero endpoint alone can also mean contact with the boundary, so equality must not be treated as proof of strict interior or strict exterior. In floating-point arithmetic, certified bounds require outward rounding.
Continue splitting unresolved boxes, normally alternating axes or splitting the longest side. Propagate the interval arithmetic results through the constructive solid geometry tree, discard exterior boxes and stop refining strict interior boxes. In sufficiently small boundary boxes, locate crossings of the active implicit equations with box edges and connect them into boundary line segments. Retain corners and resolve ambiguous multiple crossings by further refinement; here every genuine boundary piece is straight, so its supporting implicit equation allows exact intersection rather than a curved approximation. A maximum boundary-box diagonal gives spatial localization at that scale, provided no boundary components are discarded; corner-sign sampling alone provides no such guarantee.
The tight box saves empty-space work, but it is awkward for extracting facets. Entire boundary line segments, notably , and , lie on the initial box boundary, and lies on the first splitting straight line. A sign-change-only method may have no exterior sample on the other side and lose such pieces; exact zeros also persist through refinement. A slightly padded initial axis-aligned bounding box, together with an explicit rule for boundary-coincident pieces, makes the faceting more robust. The tight box is therefore economical for enclosure but not the best unqualified choice for a simple faceting implementation.
The Lanford contraction proof of the Feigenbaum fixed point replaces an unstable renormalization operator by a contracting Newton correction. Use a coefficient Banach space for normalized even maps, represented by with an absolutely summable coefficient norm on . Its complex domain and a small ball are chosen so that every map is admissible and the renormalization composition is analytic there.
A high-accuracy polynomial gives an approximate fixed point. Use a bounded invertible approximate inverse for , and define
Rigorous estimates certify
The finite coefficient computations use interval arithmetic with controlled rounding; analytic estimates bound the infinite tail. Thus the certification applies to the full function space, rather than merely a truncated polynomial system.
Part (b) gives a unique fixed point of in the certified ball. Invertibility of makes it a unique fixed point of there. The ball also preserves the quadratic critical maximum and nontrivial shape, excluding the constant formal normalized solution. Consequently an actual locally unique analytic Feigenbaum fixed point exists, with the error bound . The numerical approximation locates it; rigorous residual, derivative and tail bounds establish its existence and uniqueness. This conclusion is local, not a claim of global uniqueness among all analytic solutions.
An efficient subdivision surface interrogation interface needs the mesh topology and patch adjacency, boundary and trimming information, patch-local parameter charts and their transition maps, and local restriction/refinement with the complete influencing control net. Numerical enquiries should supply limit positions , first derivatives , and second derivatives where defined; these determine normal vectors and curvatures at regular points. It must also return certified patch bounding volumes and convergent geometric/derivative error bounds. Near an extraordinary subdivision vertex, use the local subdivision matrix and limit/tangent evaluation appropriate to that scheme; second derivatives need not exist merely because a tangent plane does. Finite refined mesh vertices are not exact limit positions.
Represent the cutting plane as , with normalized. On each chart set
The desired plane section of a subdivision surface is the image of the zero set . For a bounding volume , compute a certified interval for the plane functional over . If that interval is strictly positive or strictly negative, reject the patch. With positive partition-of-unity weights, the minimum and maximum of over all influencing control points already bound its limit patch. For masks without this convex hull property, the interface must provide a different valid enclosure.
An adaptive algorithm that isolates components before tracing is:
  • Build or reuse a bounding volume hierarchy over limit patches. Traverse only patches whose plane-functional interval contains zero; entirely rejected subtrees need no limit evaluation.
  • Recursively restrict every retained patch. At regular spline patches, use their exact polynomial/rational basis to refine range and derivative bounds. Split at representation breaks, boundaries and extraordinary neighborhoods rather than differentiating across them blindly.
  • In a sufficiently small transverse patch, certify that at least one of stays away from zero. Then the zero set is locally a graph by the implicit function theorem, with no interior closed component in that chart. Isolate all zeros on its patch edges, using certified scalar ranges, derivative bounds and safeguarded Newton root-finding iteration. Pair edge intersections according to the monotone graph structure, subdividing further if the connectivity is not certified. A certified transverse graph with no boundary zero can be rejected.
  • For every isolated branch, trace a predictor-corrector continuation method. The parameter tangent vector is . Normalize by when physical arc length steps are desired, predict , then correct with the two scalar equations and . The Newton correction solves the explicit system with rows and . Reduce the step if this system is ill-conditioned or the correction leaves its chart.
  • Transfer branches consistently across patch edges and assemble the resulting segments into connected curves, including boundary endpoints and closed loops. Edge intersection records must be shared between neighboring patches to avoid cracks or duplicate branches.
  • Keep unresolved patches containing possible tangent contacts, singular vertices, or coplanar pieces for a separate degeneracy treatment. Do not discard them solely because no sampled edge changes sign. Refine, use local polynomial/interval tests if available, or return an explicitly flagged unresolved contact region at the selected tolerance.
This is exhaustive to a chosen tolerance when certified subdivision isolates finitely many regular transverse branches and enclosures converge. If locally and , a residual tolerance corresponds locally to a geometric correction bounded by , using the gradient flow toward the level set. Bounds on second derivatives similarly control curve-segment chord error bound. As approaches zero, a fixed residual tolerance no longer gives a fixed geometric error, so the step and stopping rules must reflect conditioning.
Seeding must not rely just on corner signs. For example cut by has a closed circle wholly inside a patch whose corner values are all positive. Certified range tests plus subdivision retain it; a corner-only marching rule can miss it. Tangencies also change the nature of the output: meets in one isolated point, while a coplanar patch contributes an area rather than a curve. Thus a general plane section is not necessarily a union of regular curves; the algorithm should classify these cases instead of silently fabricating or deleting a branch.
For efficiency, cache subdivision stencils, patch extraction, limit-evaluation coefficients and bounds; reuse child data instead of reconstructing the entire refined mesh. Use local influencing neighborhoods, with the halo dictated by mask support, and keep adjacency/boundary topology separate from changing geometric coordinates. Plane-functional bounds can be computed by refining scalar signed-distance controls, which is cheaper than refining all three coordinates. Combine coarse inexpensive boxes with tighter local convex hull or interval arithmetic tests only where needed. Adapt steps to curvature and transversality, reuse branch seeds, and use regular spline evaluation away from extraordinary points. Stable edge ownership, outward-rounded bounds, scale-aware tolerances, and explicit degeneracy flags are correctness requirements as well as performance issues. The result is a limit-surface intersection computation; merely intersecting a finitely refined control polyhedron with the plane supplies only an uncontrolled approximation.
A subdivision curve interrogation interface provides its control/topology data, a parameter interval or address, and a refinement operation returning restricted child pieces with their parameter correspondence. It also provides a certified enclosing bounding volume, endpoints or limit-point enclosures, and an error estimate for replacing a sufficiently small piece by its chord. Positional and derivative limit queries may be implemented by refinement or by conversion to the appropriate spline. Nonnegative masks often imply a control-point convex hull bound; a generic scheme with negative weights needs a separate bound.
These enquiries can be applied to a parametric curve by using interval restriction as the subdivision operation and constructing its enclosure from its representation. For example, a Bézier curve is split by De Casteljau's algorithm, and each child's control-point convex hull encloses exactly that child arc. More generally, if a restricted curve has a certified bound , the midpoint supplies
This ball gives a signed plane-range enclosure. Such an upper derivative bound must be supplied or proved; taking the largest derivative seen in a few samples is not a certificate.
The recursive intersection algorithm is as follows. Start with the whole domain. For each piece with enclosure , compute
If or , discard that piece. Otherwise split it and process the children, unless a root has already been uniquely isolated and can be polished as in Question 3. For a convex hull bound, the extrema of this affine plane function are attained among its control points, so only dot products are required. For an axis-aligned bounding box, choose the low or high coordinate in each term according to the sign of .
At a small flat piece, the chord-plane parameter is
when the denominator is nonzero. It supplies an initial estimate, which is corrected on the actual curve. A chord of a piece with geometric error gives plane-function error at most ; a transverse root additionally needs a positive derivative lower bound to convert that into a parameter error. A chord hit is not by itself a proof of the exact crossing count. Keep unresolved tangent contacts, merge shared-endpoint hits, and return any certified coplanar parameter intervals separately.
Good speed comes from a bounding volume hierarchy, conservative cheap rejection before accurate evaluation, caching shared subdivision work, local rather than uniform refinement, and fast root polishing only after isolation. Convex-hull or box extrema cost far less than solving every potential intersection. Tight bounds shrink rapidly with subdivision and reduce the active search to neighborhoods of actual crossings. Derivative information can prove monotonicity, accelerate with the Newton root-finding iteration, or tighten range bounds using interval arithmetic. There is no universal fixed speed guarantee when the curve is nearly coplanar or has arbitrarily many intersections: those are genuinely difficult inputs. The representation must provide meaningful bounds and restriction operations; point/derivative enquiries alone do not imply such capabilities.
Work first in the parameter rectangle of the parametric surface. Set . With linearly independent, the chain rule gives
The intersection is transversal precisely when the implicit normal vector and the parametric normal vector are not parallel. Consequently , and the implicit function theorem makes a locally regular parameter curve. This is the setting for transversal surface intersection tracing by a predictor-corrector continuation method.
Find one seed on the required component. Subdivide parameter patches, enclosing their images by bounding volumes and testing whether a certified range of excludes zero. For a positive-weight NURBS, the active control-point convex hull supplies a convenient enclosure; interval arithmetic can tighten the range of the composed function. Search the surviving patches for a bracketed root or a local corrected seed. Merely checking signs at four corners is inadequate: a small closed intersection can lie wholly inside a patch with the same corner signs. An adaptive or certified patch search, or a supplied seed, avoids this failure. For a sphere centered at , use and ; for a torus, use its implicit polynomial and its differentiated polynomial in the same algorithm.
At a corrected seed , an unnormalized parameter tangent vector and a unit spatial tangent vector are
Choose the sign consistently with the previous tangent vector. Normalize and predict , so is approximately a physical arc length step. Correct the predictor by Newton method applied to
The Jacobian has rows and . At the starting point its first row vanishes along , whereas its second row applied to is one. The two rows are therefore independent. The transverse-plane condition prevents the corrector from sliding arbitrarily along the intersection. Restrict correction to a neighborhood of the predictor, use damping, and reduce when correction fails or its displacement becomes excessive; this prevents jumps to another nearby branch.
To obtain a sufficiently dense sequence, impose a physical point-spacing bound, a bound on tangent turning, and a chord-error estimate. For local curvature , the small-step sagitta is approximately ; estimate curvature from successive tangent vectors and reduce until this and the desired spacing are acceptable. The correction residual should be small relative to the drawing tolerance. Uniform steps in or alone do not ensure spatial density because the surface metric can vary considerably.
For an open component, trace in both tangent directions from the seed. On reaching a parameter boundary, locate the endpoint by solving together with that boundary's parameter equation, rather than accepting an overshoot. For a closed component, stop only after nontrivial travel and return to the initial parameter location with compatible tangent orientation; near-coincidence in three-dimensional space alone can mistake a self-intersection or neighboring branch for closure. Cross periodic seams using the appropriate chart identification. Adaptive physical stepping, local correction, and component-aware termination give the required point sequence. A vanishing parameter gradient signals a tangency or singularity outside the transversal hypothesis and must be reported rather than passed through by this regular algorithm.
At , orient the unit normal vector towards the eye. Define the unit directions from the reflecting point to the source and eye by
The incident propagation direction is . The law of specular reflection is , so is normal to the surface. Conversely, if the tangential components of vanish and , its unit-length summands have equal positive normal components and obey the reflection law. Therefore solve the two scalar equations
The stated orientation condition gives . It removes the back-facing ambiguity, but not multiple images or caustics. Exclude and , where these directions are undefined.
At a root where the Jacobian matrix has rank two, the implicit function theorem makes the solution set a local curve in parameter space. Compute a unit tangent in its nullspace; equivalently take the normalized cross product of the two rows of . A continuation method predicts , where , then corrects with the Newton method applied to the three equations
The last equation fixes a transverse section and allows tracing through a turning point of , where solving only for at successive fixed source parameters would fail. The corresponding space point is , with derivative along the traced parameter-space curve.
Find initial roots by subdividing the parameter cube, using interval arithmetic bounds on to discard impossible boxes and validated local solves in the remaining boxes. Trace in both directions, stop at the boundary or a recognized closed loop, and retain a record of traced boxes to avoid duplicates. Search the remaining boxes as well: starting from just one seed would miss disconnected closed reflection curves. Where loses rank, reduce the step and subdivide locally to find the outgoing branches instead of continuing a single guessed tangent. If physical visibility is required, discard roots for which either open segment or is occluded; test these segments against the surface or any supplied scene geometry.
Control the geometric approximation rather than just the parameter step. For any regular traced arc with a bound , the chord error bound gives an arc-to-chord Hausdorff distance at most . Budget, for example, half of for corrected-vertex error and half for chord error; accept a segment only when
Bound the vertex error through the inverse transverse Jacobian matrix and a bound on , or use validated root enclosures. If analytic second-derivative bounds are unavailable, recursively subdivide and enclose each arc in a geometric tube of radius at most the remaining tolerance around its chord. A midpoint test alone is a useful heuristic but cannot certify the requested error for an arbitrary oscillatory curve.
The returned vertices and their ordered connecting segments give the reflection curve to the prescribed tolerance on every resolved branch. Finite certified termination requires regular evaluable patches, derivative or enclosure bounds, and finitely resolvable branches; eye-facing normals alone do not guarantee these properties. Singular components or an identically vanishing reflection constraint must be handled as such rather than silently reported as an ordinary curve.
Use the limit subdivision surface and limit subdivision curve, rather than treating their initial control meshes as the reflecting geometry. Build adaptive refinement hierarchies for both. Each surface cell supplies a limit-position evaluator, local tangent vectors and a normal vector; each curve interval supplies a limit-position evaluator and tangent. Regular regions may be evaluated as local splines, while extraordinary neighborhoods require the evaluation machinery of the specified subdivision rules. A piecewise smooth surface is handled patch by patch, with explicit boundary or crease joins.
A useful initial polygonal construction refines the surface to small triangles and the source curve to small line segments. For a candidate mirror triangle in a plane , reflect the eye across that plane:
For a source edge , a physical reflection point is the plane intersection of the line :
Keep only , , points inside the mirror triangle, and eye/source points on the appropriate reflecting side. Unfolding the reflected path across the mirror proves the specular reflection condition. As moves along a straight edge, lies on the intersection of the mirror plane with the plane through , so the retained locus is a straight segment, a point or the empty set. Plane and triangle clipping computes its endpoints. If these defining points are collinear, or a denominator vanishes, use the corresponding limiting geometric case rather than a generic plane formula. A bounding volume hierarchy accelerates candidate search where geometric bounds exclude pairs; refined facet segments provide seeds and approximate connectivity.
To obtain the reflection curve of the actual limits, correct these seeds. In a local surface chart write , and on a source interval write . Set
The exact limit reflection locus is together with the front-side conditions. For a two-sided mirror, orient locally so that and require ; for a one-sided mirror use its prescribed orientation and discard the wrong side. At grazing incidence this orientation condition ceases to be strict and the case needs separate handling. Unlike the eye-facing assumption in the parametric question, no global orientation condition is supplied here.
Apply a continuation method: at a rank-two root of , predict in a nullspace tangent direction and correct by the Newton method on a transverse section. Map corrected parameters to , crossing patch and curve-interval boundaries through their hierarchy adjacency. Trace all branches, recognizing closed components and endpoints. Supplement facet seeds by recursive searches of the surface-cell/source-interval product, with interval arithmetic or other certified enclosures of ; otherwise a small loop absent from the initial polygonal approximation could be missed. Split singular neighborhoods where the Jacobian matrix loses rank, and test the open source-to-mirror and mirror-to-eye segments for occlusion when selecting actually visible components.
Allocate a geometric error budget to limit evaluation, root correction and polygonal chords. For example, require combined position-evaluation and corrected-root error at most and, on every regular arc, require the chord error bound . Use subdivision position and normal bounds for evaluations: a tiny position error alone is insufficient, since a wrong normal vector changes the reflected ray. Away from singularities an inverse transverse Jacobian matrix bound converts reflection residual into parameter error and a bound on converts this to space error. Refine until these bounds hold, or use validated enclosures of entire arcs and their distances to the chords.
Near a caustic the inverse bound can become large, so the hierarchy must refine more strongly or isolate the singular branch geometry. Mesh flatness alone does not certify a reflection tolerance. With regular convergent evaluators and finite resolvable components, the resulting ordered vertices and chords satisfy
The problem supplies no particular subdivision rules or smoothness guarantees, so this construction specifies what their evaluators and bounds must provide; an arbitrary nonsmooth or degenerate limit need not have an ordinary finite reflection curve. Refine for seeds, enforce reflection on the actual limit geometry, then refine the traced arcs to the required spatial tolerance.