---
title: "Inscribed Spheres"
description: "Inscribed spheres give a cheap upper bound on the separation achievable along any axis in the separating axis test (SAT): n·d − (rA + rB), where d joins the sphere centers."
url: "https://swe.quest/articles/inscribed-spheres-119dd641a396418e"
canonical: "https://box2d.org/posts/2026/09/inscribed-spheres/"
source: "Box2D"
published: "2026-09-29"
difficulty: "hard"
kind: "Deep dive"
reading_minutes: 14
tags: ["gaming","algorithms","performance","c-cpp"]
---

# Inscribed Spheres

A post on [Box2D](https://swe.quest/sources/box2d.md), published 2026-09-29, 14 min read, Deep dive. Original: [https://box2d.org/posts/2026/09/inscribed-spheres/](https://box2d.org/posts/2026/09/inscribed-spheres/)

## Summary

Inscribed spheres give a cheap upper bound on the separation achievable along any axis in the separating axis test (SAT): n·d − (rA + rB), where d joins the sphere centers. That one dot product can rule out a polytope face before the O(N) support search. Box3D extends this to edges by projecting d onto each edge's Gauss map arc, using a branchless closed-form test to drop whole edges before the edge-pair stage. On 32-vertex hulls this culls 86% of face tests and 98% of edge pairs, cutting the Convex Pile narrow-phase time by 62%, and SAT becomes roughly competitive with GJK except on long, skinny shapes.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Games](https://swe.quest/tags/gaming.md) (Domains)
- [Algorithms](https://swe.quest/tags/algorithms.md) (Architecture & design)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [C & C++](https://swe.quest/tags/c-cpp.md) (Languages)

## Prerequisites

- separating axis theorem
- Minkowski difference
- Gauss map of polytopes
- collision detection narrow-phase

## Keywords

Box3D, Box2D, SAT, GJK, Gauss map, SIMD

## Related posts

- [Open-Sourcing Rebalancer: A Generic, High-Performance Library for Solving Assignment Problems](https://swe.quest/articles/open-sourcing-rebalancer-a-generic-high-performance-library-for-solving-d79479af3daad1e0.md): Meta Engineering · 2026-09-21 · Medium · 8 min read · Algorithms, Scheduling, Open source, Datacenters, Performance engineering
  Meta has open-sourced Rebalancer, an assignment-problem solver used for nine years to place hardware, services, tasks and traffic across its infrastructure.
- [Introduction to 3D Gaussian Splatting](https://swe.quest/articles/introduction-to-3d-gaussian-splatting-4bae5755704fcc0e.md): Hugging Face · 2023-09-18 · Medium · 6 min read · Computer vision, Machine learning, Algorithms
  3D Gaussian Splatting renders photorealistic scenes in real time by rasterizing millions of gaussians, each with a position, covariance, color and alpha, instead of triangles.
- [Protocol-Aware Deterministic Simulation Testing](https://swe.quest/articles/protocol-aware-deterministic-simulation-testing-7f3b613be8faf2a6.md): TigerBeetle · 2026-08-20 · Hard · 10 min read · Formal methods, Testing, Consensus, Replication, Storage engines
  TigerBeetle's deterministic simulator (the VOPR) has full visibility into each replica's consensus and storage state, so it can check invariants that black-box tools like Jepsen or Antithesis cannot see through user-facing APIs.
- [Ribbon filter: Practically smaller than Bloom and Xor](https://swe.quest/articles/ribbon-filter-practically-smaller-than-bloom-and-xor-22be170304982d25.md): Meta Engineering · 2021-07-09 · Hard · 3 min read · Data structures, Algorithms, Storage engines
  Ribbon filters are a static (immutable) alternative to Bloom filters that save roughly a third of memory, with space overhead as low as 1 percent above the information-theoretic bound versus Bloom's roughly 50 percent, while keeping O(1) queries.
- [Results from the ASIC puzzle](https://swe.quest/articles/results-from-the-asic-puzzle-ca06d1b0c156ce5d.md): Jane Street Tech Blog · 2026-10-02 · Hard · 12 min read · Hardware, Debugging, Formal methods
  Jane Street's puzzle chip, shipped as a bare GDS layout, turns out to be a hardware checker for an 11x11 Star Battle ("Two Not Touch") puzzle.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
