Stealthy point-pattern sampling on the unit torus
Project description
blue-sampler
Generate large stealthy point patterns on the unit torus [0, 1)^D. Stealthy point patterns have vanishing density fluctuations at low ("blue") frequencies, making them useful for Monte Carlo integration, image stippling, and any application that needs well-spread, low-discrepancy points. The main blue noise sampler (RGBN) implemented here have linear complexity in the number of points and the dimension, and run in under 15 minutes for 1 million 2D points.
📦 Installation
pip install blue_sampler
🚀 Quick start
import blue_sampler as blue
# 10 000 points in 2D
x = blue.sample_points(N=10_000, D=2)
blue.plot(x, auto_zoom=True)
# structure factor visualization
blue.plot_structure_factor(x)
# higher dimensions
x = blue.sample_points(N=2_000, D=5)
# image stippling
x = blue.im2points(image="zebra.jpg")
🖼️ Example
📊 Supported dimensions
| Dimension | Notes |
|---|---|
| 2D | Fast, recommended |
| 3D | ~2× slower |
| 4–5D | Works, more iterations needed |
| ≥6D | Experimental (small N recommended) |
📚 Links
- 🌐 Project website: https://for-a-few-dpps-more.github.io/rgbn/
- 📦 PyPI: https://pypi.org/project/blue-sampler/
- 🐙 GitHub: https://github.com/For-a-few-DPPs-more/rgbn
- 📖 Documentation: https://blue-sampler.readthedocs.io
📄 License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file blue_sampler-0.1.17.tar.gz.
File metadata
- Download URL: blue_sampler-0.1.17.tar.gz
- Upload date:
- Size: 5.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4c45005ff193424533b97bb8133df19fb7765bf81b39b69cbfcffb299b9b1a3
|
|
| MD5 |
60ca533528d739bfdf24550fa7558d7b
|
|
| BLAKE2b-256 |
bd310fe8b726e6ca21ef2e6144e5a6c122284e6c8c6a7999b05b8e00e7e66aea
|
File details
Details for the file blue_sampler-0.1.17-py3-none-any.whl.
File metadata
- Download URL: blue_sampler-0.1.17-py3-none-any.whl
- Upload date:
- Size: 30.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d9ecd44806632440f674c9954ae9dd35a7e8875e5836e7da5f55018b5054a77
|
|
| MD5 |
dcf1af3938e6cda4c0bbd1b8a65517fd
|
|
| BLAKE2b-256 |
73429f6935a5648816a072d6264e6f229fedc0053935e960e558b6c4ec9fae24
|