A simple linear time algorithm for smallest enclosing circles on the (hemi)sphere
Jens Flemming
TL;DR
This work addresses the problem of computing the smallest enclosing circle on a sphere for a set of $n$ points, including a key hemisphere containment scenario. It adapts Welzl's linear-time algorithm for the 3D smallest enclosing sphere, augmented with a real-time hemisphere detector, to achieve linear expected runtime when the data lie in a hemisphere, and mirrors a 2D Welzl variant in that case. A rigorous derivation shows how boundary-size constraints and specific states enable hemisphere versus full-sphere detection, with implementation details such as plane-based containment tests and a move-to-front structure. For the full-sphere case, the paper notes that linear-time solutions are not known and points to spherical Voronoi-based approaches with $O(n\log n)$ complexity as a practical fallback, accompanied by a ready-to-use Python implementation on GitHub.
Abstract
Based on Welzl's algorithm for smallest circles and spheres we develop a simple linear time algorithm for finding the smallest circle enclosing a point cloud on a sphere. The algorithm yields correct results as long as the point cloud is contained in a hemisphere, but the hemisphere does not have to be known in advance and the algorithm automatically detects whether the hemisphere assumption is met. For the full-sphere case, that is, if the point cloud is not contained in a hemisphere, we provide hints on how to adapt existing linearithmic time algorithms for spherical Voronoi diagrams to find the smallest enclosing circle.
