Uwaga! Informacje na tej stronie mają ponad 6 lat. Nadal je udostępniam, ale prawdopodobnie nie odzwierciedlają one mojej aktualnej wiedzy ani przekonań.

Mon

23

Apr 2007

Poisson Disc is one of the best methods for determining places from which to sample some data, next to Grid, Random or Jittered methods. It prevents aliasing thanks to random distribution while preserving minimum distance between sample positions not to focus too many samples in a particular region. Unfortunately, an algorithm for generating such samples is slow and we don't know how many points we will manage to generate with specified minimum distance.

That's why I thought it would be useful to have an array of many numbers, each defining new Poisson Disc sample in the way that the more first samples you take, you still have a correct Poisson Disc samples but with more points and smaller minimum distance. I've coded a small console application for generating such arrays of 1D, 2D or 3D points in 0..1 range. I've also generated ready 1000-element arrays. Here you can find the details:
**PoissonDiscGenerator**.

I've called it **"Progressive Poisson Disc"**, described it in my master thesis [PDF, pl], used in my The Final Quest engine [pl] and also integrated into Math module of my CommonLib library.

Update 2023-11: As my colleague pointed out, taking only a small number of first samples (e.g. 16) from the array I generated doesn't make a good uniform distribution across the surface, so for that, I recommend to use some other method (e.g. samples from a grid + random jitter) or make your own implementation of this idea of "progressive Poisson Disc".

Comments | #productions #math #algorithms Share

Copyright © 2004-2024