Scattering Ellipses Without Overlapping

john's Avatar


30 Nov, 2021 04:00 AM

Seohyo asks "Is it possible to make scattered ellipses without overlapping?" She provides an example with ellipses of different sizes.

Attached is one way of doing this using the "Scatter_Evenly" node from my Cartan Node Library. This node requires a custom code module, (included in the zipped example).

Scatter_Evenly fills a rectangular space (defined by the width and height parameters) with points that are guaranteed to be a minimum distance apart (based on a supplied "Point Size" parameter) using a Poisson distribution. The smaller the point size, the more points you get. Each seed produces a different random distribution.

You cannot predict ahead of time exactly how many points you will get. So if this matters to you, adjust the point size to produce more points than you need and then use a slice node to use just the first N points.

In the example shown here, I use a numbers node to define the total number of points and feed that both into a slice node and a random_numbers node. The random_number node defines the size (diameter) of each object. If all the objects were the same size you would not need the random_numbers node.

To get an attractive distribution you can adjust the seed value in the scatter_evenly node to produce different scatters and the seed value in the random_numbers node to try different size distributions. Of course you can also adjust the total number of points and the size range of each point.

If you want to produce a tightly packed distribution of randomly-sized objects you can set the point size parameter to a value slightly smaller than the maximum size of the objects and then reduce this value until overlaps begin to occur.

If this method doesn't work for you, please respond to this thread with your additional constraints and I will attempt another method.


Reply to this discussion

Internal reply

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

Attaching KB article:


Already uploaded files

  • Scatter_Evenly_Screenshot.png 334 KB
  • 4.29 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 Dec, 2023 10:18 PM
04 Dec, 2023 10:14 PM
04 Dec, 2023 11:38 AM
29 Nov, 2023 05:30 AM
28 Nov, 2023 12:38 AM


27 Nov, 2023 04:40 AM
26 Nov, 2023 10:02 AM
22 Nov, 2023 09:33 AM
20 Nov, 2023 08:54 PM
17 Nov, 2023 01:43 AM
15 Nov, 2023 06:58 AM