Bounded Voronoi diagram in Python
Project description
boundvor
A minimal Python library that provides a wrapper for scipy.spatial.Voronoi
, clipping the resulting cells to a bounding polygon.
Installation
Install the package using pip:
pip install boundvor
Usage
import numpy as np
from boundvor import BoundedVoronoi
# Generate random points
points = np.random.rand(10, 2)
# Define a bounding box
bounding_box = np.array([[0., 0.], [0., 1.], [1., 1.], [1., 0.]])
# Create a bounded Voronoi diagram
voronoi = BoundedVoronoi(points, bounds=bounding_box)
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
boundvor-0.1.1.tar.gz
(5.3 kB
view details)
Built Distribution
File details
Details for the file boundvor-0.1.1.tar.gz
.
File metadata
- Download URL: boundvor-0.1.1.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd2a2054daa01c1765cd3b5599987bf11f71ea3af5edd879e49c4b8db427da5b |
|
MD5 | c6e12d6530d2b1c5b1c5dd263a6fa2d1 |
|
BLAKE2b-256 | e5b1fedaf29b78cee3098ef9e3749ed384fd3c890dda42c8859574d2038dd386 |
File details
Details for the file boundvor-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: boundvor-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fccf74001bcc6c94d6732881918ba172044f1a5b3cd88cab4fe5804b529a09b5 |
|
MD5 | e32fa195d4fb4a26044aec1b7331f676 |
|
BLAKE2b-256 | 6081be224b8701ad9b896cf3de5d7eb18c5fa0e2d41909a584018274a7945669 |