Grasshopper

algorithmic modeling for Rhino

Hello there!

Does anyone knows if is possible to compare same index items that have different values in a same list but in different paths?

I mean.. for example:  take one list and select the smaller value of each path

and having as a result only ONE path with that value without altering the index of the element??   

Maybe is very simple but i'm having problems with it!

After a long script to make and interactive project I have to deal with several angle values.  The only thing I need is to tell the script to use only the smallest value at the end... HOW CAN I DO THAT?? It's possible?

Maybe the image is better to understand, I only need the smaller angle comparing {0;0} with {0;1} and {0;2}.. etc  in one list that keeps the same index so the elements can rotate without having duplicate, triplicate, etc..  boxes.

Please help!

Thanks!

Views: 634

Attachments:

Replies to This Discussion

I'm guessing from your image that the different paths are of equal length and therefore you can use:

[Flip Matrix] --> [Sort] --> [Item]=0

Hi danny,  that actually help using..  [Flip Matrix] --> [Sort] --> [Item]=0  -->  [Flip Matrix]

I got a single list with the smaller values but the data change and now I can't use it to generate the rotation that I want. 

I'll keep trying and post the solution!  thanks

If it's always two lists (or alternatively a fixed number of lists) then it's relatively easy. However to make an algorithm that works for all tree topologies would be harder.

For the specific case of finding minimum (or maximum) values, you can do the following though:

--

David Rutten

david@mcneel.com

Attachments:

Hi David,  it should work for more than 2 lists...  I'm trying to change the aproach anyway...

Thanks!

I have great News!

I finally got it right, at the end I adapt the "distance grouping" definition (http://formularch.blogspot.com/2012/04/gh-distance-grouping.html)  and from there I manage to redraw new vectors to be able to rotate each piece according to the element (point) that is closer to it. 

the result are interactive vertical elements that keep the "visual cone" from each point of influence.

what do you think? maybe there is a simple way to do it?

Attachments:

There are many ways to achieve the same things in Grasshopper.

This would be another approach:

EDIT: I should have started with congratulations for getting the results :)

Attachments:

yes, thats the beauty of grasshopper.. that every time there is an other way to achieve the goal.. thank you very much.. i'll check out you script now!

Miguel.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service