Grasshopper

algorithmic modeling for Rhino

Hello.

I need to measure the angle between a bunch of vectors and the world X axis. Depending on the angle in each point, a different shape will be located and rotated in each origin point of those vectors.

But I need the angle in absolute value from the X axis (from 0 to 360 or from 0 to 2pi) and the command "angle" computes the value between the vectors, without considering the clockwise direction.

I have read other similar issues but they try to rotate the vectors one to another. My problem is that I need the value of the angle to dispatch a list and it has to be the value from the world X axis.

I hope to have explained myself, my english is not the best.

Thanks in advance!

Views: 1594

Replies to This Discussion

Thanks so much. With this explanation and the expression of Daniel I can do what I wanted to do, thanks again!!

If you want to use the [Expression] component:

IF(V.Y>0,atan2(V.Y,V.X),2*Pi+atan2(V.Y,V.X))

Thanks so much, with your help and Tom's I understand the solution! Thanks!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service