Poisson Node - Perpetual Motion
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.
Enjoy!
John
-
perpetual_motion_screenshot.png 543 KB
- perpetual_motion.mp4 366 KB
- poisson.zip 6.6 KB
Keyboard shortcuts
Generic
? | 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