Skip to main content

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


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)

Uploaded Source

Built Distribution

boundvor-0.1.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

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

Hashes for boundvor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cd2a2054daa01c1765cd3b5599987bf11f71ea3af5edd879e49c4b8db427da5b
MD5 c6e12d6530d2b1c5b1c5dd263a6fa2d1
BLAKE2b-256 e5b1fedaf29b78cee3098ef9e3749ed384fd3c890dda42c8859574d2038dd386

See more details on using hashes here.

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

Hashes for boundvor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fccf74001bcc6c94d6732881918ba172044f1a5b3cd88cab4fe5804b529a09b5
MD5 e32fa195d4fb4a26044aec1b7331f676
BLAKE2b-256 6081be224b8701ad9b896cf3de5d7eb18c5fa0e2d41909a584018274a7945669

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page