Grasshopper

algorithmic modeling for Rhino

Hi folks,

because I (and many others I guess) are struggeling with data structures I want to show my solution I have found for my problem, so it can maybe help somebody one day.
I guess somebody could do it better, so feel free to improve! I tried to make everything very graphic... :)

The situation is as follows:

  • I distribute N points on plane (dPoints).
  • On the same plane, I distribute another N/10 points (vCenters). They act as centers for voronoi cells.
  • The dPoints now find the closest point on the voronoi cell, they are located in. [which is kind of a sidegoal, but also interesting]
  • Next I wanted to devide the dPoints in 2 groups: one group which lies above the (y-value) of the vCenters, one group which lies below the (y-value) of the vCenters.
  • Therefore paths needed to be created to sort the dPoints by their associated voronoi cells.
  • Then each group (or path) needed to be split up in an above-group and in a below-group

The vCenters are marked with a small circle. If you have questions or improvements, let me know! Thanks to Hannes Löschke and Oliver David!

Views: 1672

Attachments:

Replies to This Discussion

Clever problem solving - managing data structures this way isn't easy. You might be interested in downloading my HDT Utilities "Tree Frog" plug-in - it can make this kind of data manipulation much easier. The "assign paths" component below is from the plug-in. 

Attachments:

Hey Andrew,

your component is prefectly matching my problem! Awesome! :D
I'll use it from now on, thanks for that,

--

max

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service