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!
Tags:
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
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?
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