arXiv Science⌕ Search

arXiv · 2611.33829

VoroPlex: A Python Framework for Multi-Threaded and Differentiable Voronoi Tessellation

Abstract

Voronoi tessellations are widely used in computational physics, for example to measure local structure in particle systems and to generate meshes. We present VoroPlex, an open-source Python package for computing Voronoi tessellations in two and three dimensions. VoroPlex is built on the multi-threaded version of the C++ library Voro++, so that large tessellations can be computed in parallel. The package also makes the tessellation differentiable. Each Voronoi vertex is labeled by the generators that define it, and VoroPlex uses these labels to compute the derivative of the vertex with respect to the positions of these generators. PyTorch can therefore compute gradients of quantities such as cell areas, volumes, and interface areas with respect to the generator positions, so that these quantities can be optimized using standard gradient-based methods. The package also includes tools for extracting interfaces between groups of cells and for exporting meshes. For one million points using 28 threads, VoroPlex is 46 times faster than SciPy in 2D and 39 times faster in 3D. We demonstrate the package with three applications: centroidal Voronoi tessellations with a variable density, meshing of 2D shapes defined by signed distance functions, and the design of foams with a preferred cell orientation.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Peihang Lin, Shanmei Wanyan, Mucheng Zhu, Ying Jiang, Chris H. Rycroft, Chenfanfu Jiang, Jiayin Lu. 2026-11-25. VoroPlex: A Python Framework for Multi-Threaded and Differentiable Voronoi Tessellation. https://arxiv.science/abs/2611.33829

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite arXiv Science by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

Approximate Minimum Triangle Partitions

Let $ρ(P)$ be the minimum number of triangles in a partition of a simple polygon $P$ with $n$ vertices where triangle corners may be arbitrary points (Steiner points). It is not known whether $ρ(P)$ can be computed in polynomial time. We do not assume general position: when vertices of $P$ are collinear, a triangle side may pass through several vertices, and good partitions exploit this. Every vertex of $P$ is a corner of some triangle of every partition, so $ρ(P) \ge n/3$, and any triangulation, with $n-2$ triangles, is a 3-approximation that can be computed in $O(n)$ time. This is the best factor known. We improve it in two steps. First, let $ρ_0(P)$ be the minimum number of triangles over partitions whose corners are all vertices of $P$, which can be computed in $O(n^3)$ time (Asano, Asano, and Pinter, 1986). We prove that $ρ_0(P) \le 2ρ(P)-2$ unless $P$ is a triangle, which is tight. Thus Steiner points save at most half of the triangles and $ρ_0(P)$ is a 2-approximation, computed in $O(n^3)$ time. Second, we break the factor-2 barrier of Steiner-free partitions. We observe that $ρ_0(P)$ is close to $2ρ(P)$ only if optimal partitions have few Steiner points, each with many triangles around it. We handle this case by a dynamic program over partitions in which every Steiner point in the interior of $P$ is joined to a vertex of $P$ by a straight run of triangle sides, giving a 5/3-approximation in $O(n^{12})$ time.

cs.CG↗

Fréchet Distance of Partially Ordered Point Sets

We introduce discrete and continuous Fréchet distances for partially ordered point sets. Each linear extension of a partial order defines one possible polygonal curve, and the distance between two input posets is the minimum Fréchet distance over all such curves. This includes the classical Fréchet distance for ordered curves and the unordered point-set variant as special cases. These problems are NP-hard and we give exact exponential dynamic programming algorithms for computing both distances.

cs.CG↗

Cone-Based Statistics for Characterizing the Local Morphology of High-Dimensional Point Clouds

We introduce a cone-based local geometric statistic for characterizing the angular configuration of candidate boundary points in high-dimensional point clouds and investigate its impact on cosine-similarity-based metrics when reducing embedding dimensions. Our boundary score, between 0 and 1, measures the proportion of projected neighbors contained in a cone defined by two maximally separated neighbor directions. Using the cone aperture expressed in degrees, each point is assigned a convexity behavior. We derive two variants of our cone-based statistic to account for concavity and for a boundary-relative centrality measure, which we refer to as oriented depth. The benchmark evaluations on synthetic datasets show comparable AUROC values of our statistics compared to state-of-the-art methods in two boundary settings: the distance to the support setting and the position of a point with respect to its neighbors, which we refer to as the local-sector setting. We observe the added-value of our second variant to better detect and characterize local concavity in 2 dimensions compared to the other two cone-based statistics. All three cone-based statistics provide us with different but complementary frameworks to characterize the morphology of high-dimensional point clouds.

cs.CG↗