Grasshopper

algorithmic modeling for Rhino

list voronoi by one of the set of points it was made with

Hi,
I made a 3d voronoi out of two sets of points and now I really need to be able to list voronoi cells of one of the set of points (not each cell by itself).
Example picture of my problem below.
Please help :)

Views: 578

Replies to This Discussion

Attachments:

is it even possible?

of course.  What have you tried?  The index of the cell should match the index of the point.

My problem is that I made the voronoi with two sets of points and now I have to display all the cells made by only one of the set of points. I guess I m looking for something that can match vornoi cell to its centroid ??
For my later purposes I cannot be picking cells by their indexes.
do you have any suggestions about which components I should look at?

thanks a lot!

If you use the Merge component it will keep the order (and therefore the index) of the points as shown (D1 then D2 etc). When connecting more than one input into a component it will reflect the order they were connected, so Merge gives you a little more control and it's easier to see what's going on looking back at it.

You can then use the list length to split the resulting list of cells.

(Populate geometry just used to create two lists of points, these would be your two lists of points shown in your case.)

(In case the squashed image isn't clear...)

Attachments:

I love you man, just wish u were here about 8 hours ago lol. Thanks for explanation too.

Those two lists are merged in the P input.  So if one list has 5 points (0,1,2,3,4) and another list has 5 points (0,1,2,3,4), the two lists are 0,1,2,3,4,5,6,7,8,9, the indexes 5,6,7,8,9 being from the second list.  Thus the voronoi cells which correspond should be cells index 5,6,7,8,9.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service