Skip to main content

Bounding Boxes

  • Situation: A fast box around the shared scene
  • Target: AABB · Center and extent · Containment and overlap
  • Convention: Right-handed orthonormal frame; column vectors; rightmost matrix first; angles in radians unless marked °; lengths in m · Overview

Core concepts​

  • AABB: axis-aligned bounding box; componentwise minimum and maximum of all enclosed points

  • Center and extent: c=(min+max)/2, h=(max−min)/2; h as half-size, not full size

  • Containment and overlap: interval checks on every axis; touching boundaries included under the closed-box convention

  • OBB: oriented bounding box with orthonormal local axes; local-coordinate interval checks, potentially tighter bounds

  • Transformed bounds: c′=Lc+t and h′=|L|h for an affine-transformed box; two transformed corner points insufficient after rotation

  • Closest solid-box point: componentwise clamp P to [min,max]; interior query unchanged; nearest surface point as a different problem

Worked example​

Bounds of A, B, C and Q=(2,2,3) m: size (3,4,3) m, volume 36 m³; contained Q even on the top boundary

m=(1,1,0),M=(4,5,3),c=(2.5,3,1.5),h=(1.5,2,1.5)\mathbf m=(1,1,0),\quad \mathbf M=(4,5,3),\quad \mathbf c=(2.5,3,1.5),\quad \mathbf h=(1.5,2,1.5) Pi∗=min⁡(Mi,max⁡(mi,Pi)),P=(5,2,1)⇒P∗=(4,2,1)P_i^*=\min(M_i,\max(m_i,P_i)),\qquad P=(5,2,1)\Rightarrow P^*=(4,2,1)
A fast box around the shared scene
Figure 1. A fast box around the shared scene

Practice​

  • Preparation → prediction → calculation: Previous triangle and sphere center; predict min/max → calculate all axis intervals → check Q and (5,2,1); bounds retained for ray slabs
  • Record: Assumed exercise inputs; predictions before calculation; calculated answers and optional viewer output in separate columns; no physical measurements
CasePredictionCalculated resultViewer output (optional)
2h2\mathbf h
VV
Point (5,2,1)
  • Optional extension: Degenerate box: zero thickness on one axis, valid closed bounds but zero volume

Exercises​

  1. Problem: 2h2\mathbf h
  2. Problem: VV
  3. Problem: Point (5,2,1)
  4. Problem: Box overlap guarantee for enclosed triangles
Answers and checks
  1. Answer: (3,4,3) m(3,4,3)\ \mathrm m
  2. Answer: 36 m336\ \mathrm{m^3}
  3. Answer: Outside: x=5 exceeds 4
  4. Answer: Candidate only; exact triangle test still required

Connections​