Skip to main content

PyPI Docs GitHub Open in Colab

blue-sampler

Generate large stealthy point patterns on the unit torus [0, 1)^D. Stealthy point patterns have vanishing density fluctuations at low 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. It run e.g. in under 15 minutes for 1 million 2D points on a standard CPU, and 30 times faster on a GPU.

📦 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=10_000, D=5)

# image stippling
x = blue.im2points(image="zebra.jpg")

🖼️ Example

Zebra points


📊 Supported dimensions

Dimension Notes
2D Fast, recommended
3D ~2× slower
4–5D Works, more iterations needed
≥6D Experimental (small N recommended)

Extensions

blue_sampler was extended to sample and plot various type of point sets related to the blue noise.

  • Sobol (quasi random low discrepency sequence)
  • STIT (fair tesselation of the space)
  • Clusters (fair partititions of a target distribution)
  • Pinwheels (aperiodic tiling of the space)

📚 Links


📄 License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blue_sampler-1.1.0.tar.gz (5.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blue_sampler-1.1.0-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

Details for the file blue_sampler-1.1.0.tar.gz.

File metadata

  • Download URL: blue_sampler-1.1.0.tar.gz
  • Upload date:
  • Size: 5.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for blue_sampler-1.1.0.tar.gz
Algorithm Hash digest
SHA256 58fd8106781236caf9689a8fa72e6f8dfc1f5612de1630bda5f59b7009495f12
MD5 a1cdcd83844dc420943067b5ae50ea48
BLAKE2b-256 59091a719ec4ad128920fb4292eec259de4bd64c53a328914fa0f1712f02d052

See more details on using hashes here.

File details

Details for the file blue_sampler-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: blue_sampler-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 35.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for blue_sampler-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 17909954ba38950a2a508c1f61b4a60d42e2c193a0ab2a18f2e594e9091c70ad
MD5 83fc42ecb37694de628f53044ba69fb5
BLAKE2b-256 5840a270a97c9188a567e45857f25f8ccc11a5747a4b727a6432b2f3d7663872

See more details on using hashes here.

Release history Release notifications | RSS feed

1.3.8

2 files

1.3.7

2 files

1.3.6

2 files

1.3.5

2 files

1.3.4

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.7

2 files

1.2.6

2 files

1.2.5

2 files

1.2.4

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

This release

1.1.0 This release

2 files

1.0.0

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page