Grasshopper

algorithmic modeling for Rhino

Hi everybody,

I have 100 points and I want to randomly select 50 percent of the points. To do this I wrote a rhino script to randomly select objects (see attachment). Does anybody has an idea how to do this in grasshopper?

Greetings from Munich,

Wieland

Views: 31751

Attachments:

Replies to This Discussion

Ok, I figured this one out myself, but I still don't have the gradient in the selection like in the script...

what do you mean by gradient in the selection?
That the selection gets denser in one direction.
You mean something like this?:

Thank you very much Vincent, thats exactly what I meant.
Any way you could post up the file? I haven't quite memorized the icons of the components yet and am having a hard time figuring out what is going on in the screenshot.

N
I don't think i saved the file. It's only 7 icons, it will be a good learning exercise if you try to recreate it.

What's happening is the following:
- I reference a set of point objects
- I extract the 'x' value of the point coordinates.
- I generate an interval that ranges between the lowest and the highest of these 'x' values.
- For every point, i generate a random number that lies inside the previous interval.
- I compare if the 'x' value of every given point is smaller or equal to it's corresponding random number.
- I filter out the points that don't match the previous criteria.

Thanks!!! Appreciated!!!

Hi Guys,

It sounds easy but I am stuck in this for while now.

I have a punch of points, I want to select randomly from them, which I can, and then i want to select the inverse of that Random selection, then take one of the new random sets generated and select randomly again from it, and to be able select the inverse also.

Something else, how to cull the selected list from the parent one?

Will really appreciate anybody's help in that.

bibo
maybe I didn't get it but if you want to sort/divide some list into to parts and work with both parts you should use "Dispatch" insted of "Cull pattern". If you want some kind of switcher to choose with part of list you prefer you can use Boolean toggle to invert sorting/culling pattern. Is it what you look for?

Milan

How would you assemble this definition with the current build of GH? I tried assembling the components, but i'm not having luck. I'd appreciate some help. thanks

Attachments:

The fifth component should be 'random' and not 'reduce'. Everything else looks ok.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service