Grasshopper

generative modeling for Rhino

# sorting points into clusters (list)

hey guys!

i have a list of random points.

i want to sort them by the distance to each other.

the points wich are closer to each other (points in circles) should be in branch or sublist.

do you have any ideas to handle this?

thanks bea

Views: 276

### Replies to This Discussion

Each cluster would have it's own distance threshold, so I'd say iteration is the way.
You'd need to find closest pairs and collapse those into one point. Repeat that until you found the desired number of clusters.

My idea for that (not sure if it works) - 3d kmeans, where third dimension is distance to closest point.. dimensions should be weighted (x*1, y*1, z*e.g. 0.1) to manage with overlapping convex hulls (probably they wont be convex).

...but in this particular example 2d kmeans (x and y position) should work. search this forum for kmeans (there was a good script for that somewhere)

hm... i think i dont get it...

could you help with a defininition?

Did you see this?

thank you so much!!!

http://www.grasshopper3d.com/group/coffee-and-grasshopper/forum/top...

Could be useful, some manual settings but the k-mean approach can perhaps complement it.

by Nasia.S

• Add Photos
• View All

## Videos

• ### Rhino3D Grasshopper Tutorial 14 - Expressions 01

Added by Jose Sanchez

• ### Rhino3D Grasshopper Tutorial15 Expression 02

Added by Jose Sanchez

• ### Rhino3D Grasshopper Tutorial16 - Geometric Orientation

Added by Jose Sanchez

• ### PYTHON in Grasshopper 02 Recursive Aggregation

Added by Jose Sanchez

• ### PYTHON in Grasshopper 01 Koch Curve

Added by Jose Sanchez

• Add Videos
• View All

© 2013   Created by Scott Davidson.   Powered by