Grasshopper

algorithmic modeling for Rhino

Multiple Points / Finding the MINIMUM from 3+ inputs.

Hello again everyone!

I have a series of lofted fins, the length of which is determined by 2 attractor points.

These are based on a series of points, which take their distance relative to either point. The smaller (closer) value is then selected and used for the extrusion length. This is achieved with a simple 'MINIMUM'.

This works fine with only two points, but as I expand my model I'm going to need several more points. I've looked through other posts, but I can't find a clear way to have multiple numeric inputs (in this case, multiple measurements) of which the SMALLEST value is taken.

I'm looking for a little help so that I can add multiple attractor points to this definition. Please take a look? Thanks!

Views: 1698

Attachments:

Replies to This Discussion

your in luck, david just invented an extremes component in the newest release, check it out. 

what is the difference between the extremes component and the old max and min components?

extreme can accept infinite inputs, min and max can only do 2.

Oh, sweet extremes... 

I'll download and check it out momentarily ! 

That worked wonderfully.

But there's always one more question. :)

Let's suppose that I now need to limit my inputs to a certain range. An if-then statement might work... but I don't let know how to create one in Grasshopper!

x = my input #

if x < 1.5; then use x...

if x > 1.5; substitute value 1.5

In essence, I need to limit the maximum length of a object to 1.5.

I can write this for you in another scripting language... but not this one!

Oh, answered my own (dumb) question...

In a panel, plugged into a F(x)... 

if(x<1.5,x,1.5)

Nice and straightfoward!

Thanks again for your help everyone!

or you can use larger than or smaller than components. ;)

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