algorithmic modeling for Rhino
Hi,
I'm trying to make a cylinder bend in (in Rhino) in different directions and with different magnitudes using a joystick. The setup of the bending cylinder has already been done thanks to the Jackalope plugin.
I'm able to read the joystick values (x and y) within Grasshopper. My goal now is to convert these values into to the direction (0 degrees to 360 degrees) where the cylinder has to be bent aswel as the magnitude of the bending.
I just have no idea how I would convert the x and y values in order to control two different parameters. Has anyone done this before?
Simon
Tags:
Hi SimonVP, you're probably looking for the Atan2(x,y) function. For vector amplitude use pythagoras.
Thanks Pieter. The direction now works.
For the amplitude, Should I write an expression like √((x²) + (y²))?
that's an option yes, I would use hypot(x,y).
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
© 2024 Created by Scott Davidson. Powered by