Grasshopper

algorithmic modeling for Rhino

how do you invert an input value from a slider?

thanks


-

Views: 6354

Replies to This Discussion

What exactly do you mean with invert?

Like 21 becomes 12?
sorry, i meant to negate. Or in this particular case to reverse the direction of a line.

-
multiply it by -1 ???
Doesn't work, tried that first.
Or where exactly do you mean to multiply it? With an extra component or in the "expressions" field?
On the Slider Component itself in the expression field type "-(Slider)". You can negate any input slot on another component as well as long as the name of the slot is in the Brackets.

It is the same like changing the input for a component looking for an angle from radians to degrees. Say the slots name is "A", then in the expression field type "rad(A)".
yeah, what he said
If you need to reverse the direction of a line there is a flip component under CURVE>UTILITY>FLIP. If you would like to find the reciprocal of a slider value or make it negative, use the expression line within the operation.
what he wants is to invert the NUMBERS not the geometry.

lets say a multiplication result 4 * 4 = 16

How do you invert positive 16 into negative 16.
multiply it by -1. Also you could set the minimum of the sliders to a negative number. Same with vectors, just multiply the vector by -1

There is also a negative component now since this thread is over a year old.

 

You can find it on the dropdown menu of the Math Tab > Operators Panel

How about something like that?

 

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service