Dart Poisson Disc

Generators of Poisson Disc point distributions.

Current Features

See these two pages for easy to digest explainations of the algorithm:

Getting started

  1. Add the following to your project's pubspec.yaml and run pub get:

    dependencies:
      poisson_disc: '^2.0.0'
    
  2. Add the correct import for your project:

    import 'package:poisson_disc/bridson2.dart' as bridson2;
    
  3. Invoke:

    for (Vector2 v in bridson2.generate(wdth: 256, hght: 128, toroidal: true)) {
      // Do something with points here
    }
    

Examples

  1. ./example/bridson2

    Demonstrates toroidal and non-toroidal Poisson Disc distributions an compares probability distributions of points for each.

Libraries

bridson2

Poisson Disc point distribution generators employing Bridson's algorithm