Mesh Blue Noise Sampling Save

A short implementation of blue noise sampling for triangle meshes

Project README

mesh-blue-noise-sampling

This project demonstrates a simple yet efficient algorithm to compute a blue noise sampling of a triangle mesh. The number of sample can be set to any value. The algorithm is described in the paper Sample Elimination for Generating Poisson Disk Sample Sets by Cem Yuksel.

splash screen

Getting Started

Prerequisites

You will need

Running the demo

The demo

  1. loads an ASCII STL file (a file format for 3d triangle mesh) from the standard input
  2. generates a blue noise sampling of the mesh's surface
  3. displays the samples

Using one the sample STL files provided with the naive implementation demo

xzcat meshes/fox.stl.xz | python mesh-sampling.py

By default, 2048 samples are computed. You can select a different number of samples, say, 256, using a command-line switch

xzcat meshes/fox.stl.xz | python mesh-sampling.py -s256

Implementation notes

This implementation takes a shortcut, by considering Euclidean distances between samples in the 3d space, not geodesic path lengths on the mesh. In practice, for a dense enough sampling, this should have a neglible impact on the result. However, I plan to add an option to use proper geodesic path lengths.

The algorithm calls for a priority queue, while in this implementation, a plain sorted list is used.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Open Source Agenda is not affiliated with "Mesh Blue Noise Sampling" Project. README Source: marmakoide/mesh-blue-noise-sampling
Stars
35
Open Issues
0
Last Commit
6 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating