Grasshopper

algorithmic modeling for Rhino

Hi folks!

I've been working with numerical series to sort points on surfaces and make "kind of" complex (for me) pattern behaviour. But I got to a point wher I want something to happen and can't find the way.

I have a loooong list of ordered elements from wich i would like to subtract a random number of elements. And here comes the problem.

I could "select" instead of remove if it weren't for the random generator that generates a nice list of random elemnts BUT sometimes it generates several times the same integer, so no use as it would make instances of the same element.

The cull Nth should work if it wasn't for it not accepting a list of integers.

The Cull Boolean Pattern should be the option if I knew How to generate a random boolean pattern with a determined by me number of elements.

Any help would be kindly appreciated.

Views: 2746

Replies to This Discussion

Here are two options - one which is simpler, and works based on a percentage of items to keep in the list, and one which is a little more complex but allows you to actually specify the number of items to keep in the list.
Attachments:
many Thanks Andrew! Tried it and worked perfectly!!

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