Grasshopper

algorithmic modeling for Rhino

Hi everyone,I have a problem these days and puzzled me all the time,the logic is very simple,I have a grid and one(or more)attractor point,and I want the more closer to the point ,the more points would be selected,but from now on,I could only make points be selected if the distances less than a given number,and than make a random selected,but this is not my wanted.Thanks for anyone who could give me some help。

Views: 1160

Replies to This Discussion

Method 1:
Sort all points by distance to attractor points.
Jitter the sorted list, probably using a slider between zero and one for jitter amount.
Use Split List to break the list into two chunks, the first contains the points relatively closer to the attractors.

Method 2:
Comoute the distance from all points to all attractors.
Generate a list of random numbers that is equally long as your point list.
Add the distances and the random numbers together.
Cull based on some > logic.


Benefit of second method is that it doesn't change the order of points, and it can handle multiple lists of points, even grafted points, as long as you provide a different seed for each list.
Thanks a lot ,it is very helpful!

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