Distinct Points

john's Avatar


28 Jan, 2023 10:39 AM

Attached is a new node: distinct_pts.

Distinct_pts works like the Nodebox distinct node for points. If you set its sensitivity to 0, it will remove all duplicate points in a list (based on positions rounded to nearest hundredth of a pixel). It returns original (unaltered) points, even if some rounding was used when determining duplication.

You can also increase the sensitivity setting to treat all points within the given closeness as the same point. The higher this value, the more points may be removed.

The attached demo shows two examples:

  • The circle on the left consists of 10,000 blue dots scattered in clumps. The black dots are what remain as distinct points with a sensitivity of 8. Adjust this sensitivity to see which dots are selected.

  • The circle on the left has two hemispheres. The left hemisphere is filled with a scatter of 2000 dots. Four distinct subsets are then superimposed on these to from a total of 5000 dots in 2000 positions. The right hemisphere shows what distinct positions remain with a sensitivity of 6. If you set the sensitivy to 0, the original 2000 positions will be revealed.

In addition to clearing duplicate dots from paths, you can also use distinct_pts as a crude data sampler. But beware: when sensitivity is greater than 0, the points returned are somewhat arbitrary (depending on the order of the points in the original list). You can see this in the left example by changing the seed in the shuffle5 node; the blue dots will not be affected, but the black dots chosen to represent them will change.

The distinct_pts node will be included in the next release of my Cartan Node Library. Comments welcome.


Reply to this discussion

Internal reply

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

Attaching KB article:


Already uploaded files

  • distinct_points_screenshot.png 1.1 MB
  • distinct_points_demo.ndbx.zip 2.71 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

15 Jul, 2024 07:37 PM
11 Jul, 2024 03:48 PM
28 Jun, 2024 01:51 PM
27 Jun, 2024 02:56 PM
27 Jun, 2024 01:57 PM


26 Jun, 2024 08:17 PM
26 Jun, 2024 11:35 AM
24 Jun, 2024 02:42 AM
24 Jun, 2024 12:46 AM
23 Jun, 2024 08:07 AM
08 Jun, 2024 09:05 AM