Grasshopper

algorithmic modeling for Rhino

WISH : Vector components in user specified coordinate system AKA "plane"

I feel that it would be very useful to have a GH component which would accept a vector and a "Plane" as input, and would output the X, Y and Z of that vector in the "plane"'s coordinate system.

...or is there an existing simple method to do this ?

Cheers,

--

Olivier

Views: 2777

Replies to This Discussion

I just found out that it was possible to specify a coordinate system with the pComp (point decompose) component.

Too bad there isn't such an option for vComp (vector decompose).

Well I guess I can make a workaround with pComp, but it means moving my plane to the origin, creating a point representing the tip of my vector .... :(

Cheers,

--

Olivier

OK, I officialy wish that VComp had a Plane parameter, just like pComp.

--

Olivier

Hi Olivier,
I can not help you with your problem, but I am interested in the way you solved this (moving that plane to the origin, creating a vector tip point).

Can you clarify this a little bit?

Thank you.

Hi Djordje,

My "planes" are coplanar, but this can be done even if they are not ; it just takes an extra rotation.

Let's call "Alpha" the angle between my global coordinate system and the "custom" one.

Let's call "V" the vector for which I want coordinates in the custom "plane" coord. system.

I create a point at the origin of the custom "plane" ; then I move it using "V" as the translation vector.

I then rotate this last point around the custom "plane"'s origin using the "Alpha" angle value.

Using pComp component on that rotated point with the custom "Plane" as local coordinate system will give you what you are looking for : the components of "V" in that coordinate system.

There might be a smarter way, but adding a Plane parameter in vComp would be so much easier !

Cheers,

Olivier

Thank you for the reply Olivier.

This probably has to do with my misunderstanding of the way vectors are "recorded" in grasshopper, so I did not understand you.
But thank you in any case.

In GH vector define as a point of vector end (with start point of vector at 0.0.0).

Thank you for the reply Igor, I think I understand now:
Grasshopper translates the beginning of each vector to a 0,0,0 point, and represents the vector just as the ending point coordinate of that vector?

Yes.

Большое спасибо

Thanks Igor,

This is more elegant than what I am doing.

But again, this would be even better :

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service