Topology goal?

Hi Daniel,

I wonder if it’s possible to force the particles to have n amount of particles nearby. That is, for a given point, a given radius of influence, a given number of neighbours n, and a given strength, the particle attracts others if it has less than n or repels if has more.

It would be great to make grids, for example given an arbitrary set of points in the plane, to force them to position themselves on a hex grid.

What do you think?

@DanielPiker in case you missed this, hi :stuck_out_tongue:

Hi Dani,

I think this is a really interesting topic.
I have tried something along these lines once a while back - experimenting with the idea of valence, like in chemical systems.
I think the results were interesting, and quite biological looking, but I didn’t get it to where I was imagining in terms of the structures formed.
Here’s where I got to with some of those tests:

and here’s the file (12.9 KB)

Choosing the thresholds for attraction and repulsion is critical.
The other thing that I think might make this work better is some way of stopping them just forming triangles, by making a point’s connected neighbours repel each other. It also might be better to work with line segments from the start.
Also here the attraction and repulsion is spring-like in the way its strength varies with distance, but that introduces a discontinuity (since when points get below the threshold distance the attraction suddenly kicks in at a high strength), and this might be bad for stability. A custom distance based attraction could help.
Anyway, I think there’s a lot more that could be played with here…


That’s great, Daniel. Thank you so much. Returns cool results.
I tried to do it myself because of your example but I didn’t get what I wanted. Either I’m doing something wrong or the premise of this thread doesn’t work because of collective interference.
(works on R6). (31.5 KB)