Table of Contents

Class PoissonDiskSampler2D

Namespace
GrindFest.Generation.Common
Assembly
GrindFest.dll

Bridson Poisson-disk sampler over an axis-aligned bounding box, with support for: an arbitrary polygon mask (only points inside accepted) and a list of exclusion circles (samples inside any are rejected).

Reference: Robert Bridson, "Fast Poisson Disk Sampling in Arbitrary Dimensions", 2007. ~80 lines, 30 candidate attempts per active point.

public static class PoissonDiskSampler2D
Inheritance
object
PoissonDiskSampler2D

Methods

Sample(Rect, float, SeededRandom, IList<Vector2>, IList<(Vector2 center, float radius)>, int)