generative modeling for Rhino
I need help fast
I'm doing an image with image samples and use the output numbers for the radius of circles.
I want the numbers between:
10 and 15 to turn into to 12
15,01 and 20 to turn into to 18
20,01 and 30 to turn into to 25
How do i do that?
Tags:

You could use a very complex expression, like so:
If(r <= 15, 12, If(r <= 20, 18, If(r <=30, 25, -1)))
It's not exactly the same as your logic, but it first tests the radius to see if it is smaller than or equal to 15. If it is, the function will return 12. If it isn't, then the radius is compared to 20, and if it's smaller than or equal to 20, the function will return 18. etc.
--
David Rutten
david@mcneel.com
Poprad, Slovakia

This is another method. A bit less geeky but also somewhat less well defined. Values on the transition between two adjacent intervals might give unpredictable results.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Permalink Reply by Philipp on March 29, 2011 at 3:55am
Permalink Reply by simon.mouritsen on March 29, 2011 at 4:27am Thank for all the help
But it still doesn't work for me
I have uploaded the files
btw i'm new at this
Permalink Reply by a4chitect on March 29, 2011 at 4:36am
Permalink Reply by a4chitect on March 29, 2011 at 4:54am here is your modified file
*removed due to a found bug*

Behold the power of Expressions!
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Permalink Reply by simon.mouritsen on March 29, 2011 at 8:55am Thanks a lot guys..
It was about the same thing I was doing, except the multiplications wasn't working for me.
Added by Mgeorgio 0 Comments 0 Likes
Added by Mgeorgio 0 Comments 0 Likes
© 2013 Created by Scott Davidson.
Powered by