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

16 Jun, 2022 05:30 AM
15 Jun, 2022 06:03 AM
06 Jun, 2022 01:07 PM
02 Jun, 2022 11:58 PM
30 May, 2022 07:48 AM


24 May, 2022 06:27 PM
20 May, 2022 04:12 PM
05 May, 2022 02:25 AM
03 May, 2022 04:46 AM
01 May, 2022 09:22 AM
18 Apr, 2022 09:01 PM