algorithmic modeling for Rhino
Not strictly a GH question.. if I have a list of numbers, how might I "compress" the list to bring each value closer to the total average. Not remapping but "Flattening," so to speak?
It's such simple mathmatical problem but i just cant figure it out.
Thanks
Tags:
I'm not sure i really understood your question. Just use the remap numbers component.
yep I think it is technically remapping but the remap component alone still keeps the relative differences between the values, Ethan's solution is almost what I need but yours looks intriguing so I will have a look.
Details, details! Too hasty in my reply...
I had reversed the inputs for creating the new domain. :( Was puzzled that the two rows of points didn't seem to align as expected and shocked when I connected the two sets of points with lines that crossed in the middle!?
They still don't align unless you shift the second row in X due to the average (48.438 in this case) being different than the middle of the original domain (50), but they are now spaced proportionally as expected.
P.S. Ethan's code and mine produce different results, which is interesting...?
Sorry I deleted my last reply because it made no sense! Here is a more clear example i hope..
Trying a different approach but looking for a way to "merge" the two lists of values corresponding to the pipes lengths while maintaining control. So for example in 0-1, 0 would the the image on the left, 1 the right and 0.5 in between
This is my response to your deleted question - it made sense to me. I used two 'Random Reduce' components with inverse values from zero to one ("Variable X" slider control) applied separately to the lengths of two lists (so the lists can be of different lengths).
This simple illustration plots points in two separate ways: "Pan" and "Mixed", which affect the X coord while the mixed list results define the Y coord:
I'll look at your new code as time permits... :) Maybe you'll beat me to it?
Interesting stuff!
And yes don't worry I got it thanks, it was so simple haha .. oh dear.
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