Table of Contents
Fetching ...

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.

A simple linear time algorithm for smallest enclosing circles on the (hemi)sphere

TL;DR

This work addresses the problem of computing the smallest enclosing circle on a sphere for a set of 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 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.
Paper Structure (10 sections, 4 theorems, 4 equations, 1 figure, 2 algorithms)

This paper contains 10 sections, 4 theorems, 4 equations, 1 figure, 2 algorithms.

Key Result

Lemma 1

The small cap defined by a spherical circle with radius $r<\frac{\pi}{2}$ and center $c$ equals the intersection of the sphere and the ball with radius $\sin c$ centered at $(\cos r)\,c$.

Figures (1)

  • Figure 1: Runtime for point clouds of different sizes between 100 000 and 1 million points. Points are uniformly distributed in a 'rectangle'. Longitudes span 90 degrees, latitudes span 60 degrees. For each cloud size the algorithm is run 10 times. Computations were done on one core of an Intel Core i7-8550U CPU with 1.8 GHz. Code is available in github.

Theorems & Definitions (10)

  • Definition 1
  • Lemma 1
  • proof
  • Definition 2
  • Lemma 2
  • proof
  • Theorem 1
  • proof
  • Corollary 1
  • proof