algorithmic modeling for Rhino
Hi guys!
I was trying to do a random selection of a fixed number of non-repeatable elements in a list. I mean that every randomly chosen element must be unique.
In the screenshot attached you'll see how I was genereting the list that I would use as list of indexes for the list of elements...
But there is often (and obviously...) at least one index repeated.
Any idea?
Thanks so much,
Filippo
Tags:
It's typically a better idea to generate a non-random list of unique values (that is easy after all) and then randomize it. Either use RandomReduce if you have too many values and you can use Jitter to randomize the order of the values.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thanks, It works!
Sorry, for re-post David :p
I don't see your post before
Thanks! It is exactly what I was looking for.
Thanks again!
You're welcome
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by