Search arXiv⌕ Search

arXiv · 2508.17496

Practical Insertion-Only Convex Hull

Abstract

Convex hull data structures are fundamental in computational geometry. We study insertion-only data structures, supporting various containment and intersection queries. When $P$ is sorted by $x$- or $y$-coordinate, convex hulls can be constructed in linear time using classical algorithms such as Graham scan. We investigate a variety of methods tailored to the insertion-only setting. We explore a broad selection of trade-offs involving robustness, memory access patterns, and space usage, providing an extensive evaluation of both existing and novel techniques. Logarithmic-time methods rely on pointer-based tree structures, which suffer in practice due to poor memory locality. Motivated by this, we develop a vector-based solution inspired by Overmars' logarithmic method. Our structure has worse asymptotic bounds, supporting queries in $O(\log^2 n)$ time, but stores data in $O(\log n)$ contiguous vectors, greatly improving cache performance. Through empirical evaluation on real-world and synthetic data sets, we uncover surprising trends. Let $h$ denote the size of the convex hull. We show that a naïve $O(h)$ insertion-only algorithm based on Graham scan consistently outperforms both theoretical and practical state-of-the-art methods under realistic workloads, even on data sets with rather large convex hulls. While tree-based methods with $O(\log h)$ update times offer solid theoretical guarantees, they are never optimal in practice. In contrast, our vector-based logarithmic method, despite its theoretically inferior bounds, is highly competitive across all tested scenarios. It is optimal whenever the convex hull becomes large.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Ivor van der Hoog, Henrik Reinstädtler, Eva Rotenberg. 2025-08-24. Practical Insertion-Only Convex Hull. https://arxiv.org/abs/2508.17496

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Largest-Area Convex Quadrilateral in a $1.5$D Terrain

A $1.5$D terrain is a simple polygon bounded by a horizontal base and an $x$-monotone upper chain. We study the problem of finding a largest-area convex quadrilateral contained in an $n$-vertex terrain. We maximize area over the closure of the feasible nondegenerate quadrilaterals, allowing a triangular boundary optimum when necessary. Assuming that no three terrain vertices are collinear, we give a deterministic exact algorithm running in $O(n^2\log n)$ time and using $O(n)$ working space in the algebraic real-RAM. Among all optimum solutions, the algorithm returns a nondegenerate quadrilateral whenever one exists; otherwise, it returns a maximum-area terrain triangle. We also prove that a maximum-area axis-parallel rectangle contained in the terrain yields a tight $\frac12$-approximation and can be computed in $O(n\log n)$ time.

cs.CG↗

Endpoint Covering of Axis-Parallel Segments:Bichromatic and Monochromatic One-Center

We study exact one-center optimization for axis-parallel segments using axis-parallel squares under endpoint-based coverage, where a segment is \emph{$1$-covered} if the square contains at least one of its endpoints. In the monochromatic problem, we seek a minimum-side-length square that $1$-covers all $n$ input segments. We obtain $O(n\log n)$-time algorithms for both unrestricted and segment-constrained centers. The unrestricted bound matches the known bound implied by the two-representative color-spanning-square problem, whereas the segment-constrained result is new. We also prove matching $Ω(n\log n)$ lower bounds for both center models in the fixed-order algebraic decision-tree model. In the bichromatic problem, an admissible square must fully contain all $m$ blue segments, minimize the number of red segments with an endpoint in its interior, and, subject to this minimum, maximize its side length within a prescribed bounding box. We give deterministic $O(m+n\log^2 n)$-time and $O(m+mn\log n)$-time algorithms for unrestricted and blue-segment-constrained centers, respectively.

cs.CG↗

A Collapse Process for Farthest Voronoi Diagrams of Lines in Three Dimensions

We study a \emph{collapse process} to construct the farthest Voronoi diagram of lines in three dimensions, given a spherical map of the diagram's unbounded features. The collapse process sweeps through the diagram in order of decreasing distance from the farthest lines. It follows the \emph{shrinking map}, a cell complex on a topological sphere that encodes the locus of points with a fixed farthest distance. We show that, in three dimensions, the collapse process has exactly four non-terminal local event types that change the structure of the shrinking map: \emph{deletion, swap, local minimum}, and \emph{local maximum} events; plus one terminal event. This list is complete. We give intrinsic three-dimensional geometric descriptions of the four non-terminal events. First, we classify the two vertex-related events, deletion and swap events, by the spherical convex hull of the four tangent points from a vertex to its four defining lines. Then, we analyze the events related to the local extrema of the distance function along the trisector of three lines. We show that the distance function along a trisector has at most $4$ local maxima and $8$ local minima, and that both bounds are tight. The extrema can be found via a polynomial of degree $12$. As a byproduct, this gives a direct method for finding the smallest sphere tangent to three given lines. At each local extremum, the tangent sphere touches the three lines at points lying on a great circle. The collapse process and the completeness of the event list also apply, under similar general position assumptions, to the farthest Voronoi diagram of convex sites under strictly convex distance functions.

cs.CG↗