I think I have a very basic problem, but I am missing a component/crucial data tree step somewhere.

From the attached point of clouds, I want to be able to find out what the distance from each point in the cloud, to it’s closest neighbour out of the same cloud, is. So in this case, I need 162 distances as an output.

It seems like I would need some recursion perhaps to take each point to search out of the cloud, before performing the search.

The end goal is to cull points of a certain proximity to their neighbour.

This worked well as part of my algorithm - but not for the underlying logic.

Really, the best thing that I would want to obtain from the definition as an output is the distance to the closest circle, from the random circles I am populating. This would be in such a way that no circle is more than a set distance from another. That’s the end goal - populate random circles, and ensure circles are a minimum distance of 1.3mm from each other.

I managed to generate something, using all permutations of lines between all points and culling any less than a certain distance. It’s definitely not slick though.

Maybe there’s some kind of different underlying logic I can use, such as circles inside of polygonal cells?

Your solution is not using the radiuses, but only the center-center distances…

…what you want to happen when 2 circles are too much close each-other?
Delete one? Delete both? Change radius of one/both? Move the circles?
If you are ok with the last option, a circle packing with kangaroo would be the best and simplest solution.

(if you remove some point/circle you’ll see empty spaces probably…)

That’s right - so far I only have centre/centre, which isn’t really a full story.

When two are too close together, their radius could maybe change to another option from rList (0.75, 0.9, 1.0, 1.1), or move in such a way that the minimum distance is abided by.

Exactly! The Culling at the end is not a good solution IMHO.

Could a circle packing be performed, then using the radius of each packed circle, perform an offset/scaling to each circle, so each one is half the minimum distance away from the original circle (i.e. the minimum distance away from each other, albeit they would be densely packed and not spaced so nicely in a random manner.

I guess though, you could control by Multiplacation/Division a minimum offset and then others can be offset only by more. So in effect you are left with the point cloud still controlling circle location. There would also need to be a maximum offset so the end size of circles (eventually spheres) are within my control (they don’t have to be discrete values from a list)

I 've never tried Kangaroo however so am at a bit of a loss as to where to start - help would be greatly appreciated!

Thank you so much for this, you’re right!I disconnected my PopulateGeometry and attached my point collection and the deformation maintained integrity of points that didn’t need to move too much. Thank you!

Do you have ay personal recommendations for where to start with learning Kangaroo? I’ve only seen some beginner videos so far. I love the definition but haven’t quite managed to logically understand it yet!

I, personally, just “messed around” in the forum and learned bit by bit how to use it…
look at all the discussions under https://discourse.mcneel.com/c/grasshopper/kangaroo
… you can find a lot of small definition and try to get the logic with them.

Thanks again so much for your definition. I wonder if there is a way for the packed circles to be kept on the surface/mesh, whereas currently it is the centre points only that are definitely on the mesh. (which still works absolutely great!)

I can do an offset curve equal to the biggest radius of circle I am using, but then when smaller circles are close to the offset, there is of course a wider more noticeable gap. I would still need the controlled distance between circles.