Grasshopper

algorithmic modeling for Rhino

Hello,
the following problem/bug(?) gives me a hard time. I want to convert a given angle (entered via a slider; range 0-360) into its corresponding vector. To do so, I use the sine(a) and cosine(a) functions, as follows:

sin(a) gives the y-vector
cos(a) gives the x-vector

Afterwards,I combine these values using vector xyz component to obtain the vector.

However, sin(90) returns 0.89.... and cos(90) returns -0,448... and not 1 and 0, etc.

What do I miss?

Thank you for your help.
H.

Views: 5154

Replies to This Discussion

Gna,
figured it out. Its using radians, so I have to convert the angle first.

sin(rad(x))

thx,
H.

thanks ; ) usufull...resolve my problem...

the code for someone....

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service