Poisson Node - Perpetual Motion

john's Avatar


31 Dec, 2019 12:25 AM

Attached is a demo of a new custom node: poisson.

Poisson generates random but evenly spaced points within a given rectangular area using Poisson Disk Sampling. It requires the poisson.py python module (included in the zip file).

The algorithm is by Robert Bridson (https://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk...) and the Python module is based on code by Christian Hill (https://scipython.com/blog/poisson-disc-sampling-in-python/). I adapted it to work with NodeBox.

To use the node just specify the width and height of a rectangular region and a point size - the minimum distance between neighboring points. If you use the points to draw objects with a diameter less than or equal to this point size, none of the objects will overlap. To fill a non-rectangular region, just use a delete node to delete points outside the region.

Poisson is an alternative to the scatter node (which creates random but ugly, non-homogenous, and often overlapping positions). It is surpassingly useful.

The demo creates an animation of a perpetual motion machine. As the pistons go up and down the gas molecules inside become more or less compressed. The molecules swim about in a brownian way but fill the available space in a pleasing fashion.

I will be including this node in the next 1.1 release of my node library.

If you use this in your own projects please consider sharing here on the forum.



Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • perpetual_motion_screenshot.png 543 KB
  • perpetual_motion.mp4 366 KB
  • poisson.zip 6.6 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

04 Jul, 2020 08:13 AM
07 Jun, 2020 04:08 AM
04 Jun, 2020 11:48 PM
25 May, 2020 09:13 PM
24 May, 2020 09:33 PM