Mesh Node

john's Avatar

john

19 Aug, 2023 08:59 AM

Attached is the demo for another new node: mesh.

Mesh creates a list of line segments connecting a set of neighboring points. It takes four parameters:

  • Points or shapes. A list of points and/or shapes. Any shapes are replaced by their centroids.
  • Radius. Limits the area around each point when searching for neighbors. The tighter the radius, the faster this node runs.
  • Neighbors. N, the maximum number of neighbors to connect to each point.
  • Mutual. If checked, only mutual neighbors will be connected.

For each point or centroid in the input list, mesh connects that point with the closest N other points found within the specified radius. If a line connects point A with point B it means at least one is a neighbor to the other. If "Mutual" is not checked, it means that B is one of the N closest points to A OR A is one of the N closest points to B. If "Mutual" IS checked then a line means that BOTH are true: A is a neighbor of B AND B is a neighbor of A.

Finding neighbors is computationally expensive because you have to measure the distance between each point and every other point, so the number of comparisons grows exponentially with the number of points. Mesh can usually handle a few hundred points, but may bog down if given a thousand points. To avoid freezes, start with a small radius and gradually increase it. Just be aware that if you make the radius too small, some valid neighbors may not be close enough to be found.

You can use the mesh node to quickly create a wide variety of networks, fishnets, cobwebs, etc. Frankly, I'm not sure how useful this node will be, but I suspect that, with some experimentation, we might be able to create some truly surprising effects.

Please try playing with this thing and report back if you come up with anything interesting!

John

  1. 1 Posted by aderog on 25 Aug, 2023 08:52 PM

    aderog's Avatar

    tried to flex your haiku a bit ↓ attached.
    ... yet another depresh sesh averted, thanks to you, John! the sheer amount of work you're doing here means a LOT to me, dearly.
    looking forward for your next node.

    maximum respect,
    a.

  2. Support Staff 2 Posted by john on 30 Aug, 2023 03:16 AM

    john's Avatar

    Aderog,

    My apologies. Your post somehow ended up in the forum spam folder and I only just now noticed it. This keeps happening - which makes me sad.

    Thanks much for your kind words and for actually playing with my mesh node. Your idea of having some points float around like motes of dust and simply mesh them together in each frame is simple but brilliant. I might try some variations on this idea myself!

    I look forward to hearing from you again. I just posted another node - quadtree - which you may find worthy of playing with. Happy to help you avert depress seshes whenever I can.

    John

    P.S. If you get a chance, please reply to this note so I know you saw it and are free from the spam monster.

Reply to this discussion

Internal reply

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

Attaching KB article:

»

Already uploaded files

  • mesh_screenshot.png 494 KB
  • mesh_demo.ndbx.zip 3.05 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

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

Recent Discussions

30 Nov, 2023 08:38 PM
29 Nov, 2023 01:33 PM
29 Nov, 2023 05:30 AM
28 Nov, 2023 10:03 PM
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