PoissonDiscArray Op
Generates an array of evenly-spaced random points using Bridson's Poisson Disc sampling algorithm. Unlike RandomNumbersArray, points are guaranteed to maintain a minimum distance from each other, producing organic, non-overlapping distributions — ideal for natural-looking layouts such as particle fields, scatter patterns, or instanced object placement. Supports both 2D (XY) and 3D (XYZ) modes. Output is a flat array compatible with ArrayIterator (stride 2 or 3). Seeded PRNG ensures reproducible results.
Summary (oneliner)
Inputs
| Port | Type | Default | Description |
|---|---|---|---|
| Max Points | Integer | 100 |
Maximum number of points to generate. Actual count may be lower if the domain cannot fit more at the given minimum distance. |
| Mode | Switch | XY |
XY (2D) or XYZ (3D). Sets the array stride accordingly. |
| Random Seed | Float | 0 |
Seed for deterministic output. |
| Min Distance | Float | 0.1 |
Minimum spacing between any two points. Lower values = denser packing. |
| Max Candidates | Integer | 30 |
Attempts per active point before rejection. Higher values produce tighter packing but cost more. |
| Width | Float | 2 |
Sampling domain width. |
| Height | Float | 2 |
Sampling domain height. |
| Depth | Float | 2 |
Sampling domain depth. Only active in XYZ mode. |
| Center Origin | Bool | true |
When enabled, offsets all points so the distribution is centered around (0, 0, 0). |
Outputs
| Port | Type | Description |
|---|---|---|
| Array Out | Array | Flat coordinate array (stride 2 or 3), ready for ArrayIterator or PointCloudFromArray. |
| Total Points | Number | Number of points actually generated. |
| Array Length | Number | Total length of the output array. |
Usage
Drop-in replacement for RandomNumbersArray in any patch using ArrayIterator. Connect Array Out to an ArrayIterator and use Transform to position instanced geometry at each sample point.
Algorithm
Uses Bridson's fast Poisson Disc sampling (O(n) complexity) with a seeded Mulberry32 PRNG for reproducibility.
- Ops.Patch.Pl397Wc.PoissonDiscArray
- Patch Op - visible in this patch only
- MIT
Documentation (markdown)
Issues
Example patch id
Youtube ids (comma seperated)
Op Licence
Caniuse query
I see you
Click to redistribute 👀
—
Credits to https://cables.gl/user/Tibbrs for eyes blinking
—
New PoissonDiscArray Op based on Poisson Disc Distribution by Bridson https://cables.gl/op/Ops.Patch.Pl397Wc.PoissonDiscArray