Back to Plugins
@sposhe/poisson

@sposhe/poisson

Generates a random distribution of one or more elements a minimum distance apart.

generatorrandom generatorpoissonrandomcode generatorsdistribute

Plugin Preview

@sposhe/poisson preview

About this plugin

Poisson

Generates a random distribution of one or more elements a minimum distance apart. Optionally randomizes rotation.


How to Use

  1. Create a frame
  2. Add one or more elements to the frame (these can be shapes, component instances, or other frames)
  3. Select the frame
  4. Run the plugin
  5. Set a minimum distance threshold (and optionally set if rotation should be randomized)
  6. Press the "Create" button


How it Works

The plugin creates a new frame beside the source frame, and draws copies of the source element(s) using the poisson-disc distribution algorithm until the frame is filled. If more than one source element is used, the source element for each node is chosen randomly.


Under the Hood

The plugin uses Beau Gunderson's poisson-disk-sampler javascript package, which is based on Mike Bostock's implementation of Jason Davies' implementation of Bridson's algorithm. View Mike Bostock's great explanation of how poisson-disc sampling works.

Plugin Details

Version1
CreatedMarch 14, 2021
Last UpdatedMarch 31, 2021
Categoryediting & effects plugins
CreatorSean O'Shea
Stats1184 installs, 47 likes
PricingFree

Technical Details

  • API:1.0.0
  • UI:ui.html
  • main:code.js