delaunay-triangulation
This library is used for computing the Delaunay triangulation of 2D point sets.
An example Delaunay triangulation output for 32 points is shown below.
Why is this library special?
Speed! This is a pure python implementation of the Guibas & Stolfi's divide and conquer algorithm. The divide and conquer algorithm has been shown to be the fastest DT generation technique, with O(n log n) running time. Furthermore, this code has been parallelised using the MPI for Python (mpi4py) library to utilise multiple CPU cores. This allows the algorithm to be efficiently scaled for distributed computing across supercomputer nodes.
Installation
Parallel Delaunay can be installed by running pip install parallel-delaunay. It requires Python 3.8+ to run.
To import and use the library see scipi_comparison.py for an example of generating a random set of 2D points and running the delaunay triangulation algorithm.
Benchmarking
Single core results
As seen in the graph below, this Delaunay triangulation implementation scales just as efficiently as the SciPy implementation. The SciPy library is written in C and wrapped in Python for ease of use. As a result, the SciPy DT algorithm is consistently around 40x faster for a given number of points. However, the benefit of my library is that it can take advantage of multiple CPU cores, offering a performance advantage unavailable to SciPy users. By utilising the multiple cores available in modern computers, the run time can be reduced linearly by a factor approximately equal to the number of available threads.
This graph can be reproduced by running python src/triangulation_benchmarks.py.
Structure
This repository is currently structured as follows.
├── src
├── triangulation_core
├── points_tools
├── generate_values.py
└── split_list.py
├── edge_topology.py
├── linear_algebra.py
├── triangulation.py
└── triangulation_primitives.py
├── utilities
└── settings.py
References
[1] Guibas, Leonidas and Stolfi, Jorge 'Primitives for the Manipulation of General Subdivisions and the Computation of Voronoi' In: ACM Trans. Graph.4.2 (Apr.1985), pp. 74–123. issn: 0730-0301 doi:10.1145/282918.282923
Metadata
Release files for parallel-delaunay 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| parallel_delaunay-1.0.0.tar.gz | 13.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parallel_delaunay-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.2 kB
Release files / parallel_delaunay-1.0.0.tar.gz
| Download URL | parallel_delaunay-1.0.0.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77a4775e0d1b4f1fa3a1be8acf5f1ec9183aac9d2a283c7d247b925149bd8482
|
|
BLAKE2b-256 checksum How to use checksums |
6e7b06c87016bec265567e41b51d363fb14f193a1d52aeedc57b97e24c952204
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.1 CPython/3.10.10 Windows/10
|
Release files / parallel_delaunay-1.0.0-py3-none-any.whl
| Download URL | parallel_delaunay-1.0.0-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e9e8130afdddd64f5d81a213cbd077c04221d9bb6befbab78bd5c738b6c3785
|
|
BLAKE2b-256 checksum How to use checksums |
03dc68320b977e2322a3c9189c10ae2c79ceded762b7be39d800108bc1da7ea3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.1 CPython/3.10.10 Windows/10
|