cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

find angles for a 3D rotation

JBlackhole
16-Pearl

find angles for a 3D rotation

to all

I am trying to set up a Find() to see if I can solve the following problem

given a vector in global coordinate system (vglobal) and a vector in a local coordinate system (vlocal) so that the local co-ordinate system has rotated by angle (a,b,c)

can one find these angles? in other words if one knows the starting vector and the final (vector) can one find the transformation

problem is set up (see attached) but the exact syntax for the Find() is failing me

Thanks

Regards

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:JBlackhole)

Here is a variations which does not limit you to vectors of same length (if only the directions counts) and at least in the example given for some reason unknown to me provides the  "expected" solution:

Regards

Werner

View solution in original post

5 REPLIES 5

Something like that?

Pic_1.png

thanks a lot VladimirN. Much appreciated. Will look into the proposed way of doing it

Werner_E
25-Diamond I
(To:JBlackhole)

It would make sense to turn the solve block into a function dependent on the two vectors.

Of course there are many ways to turn one point into another as long as they have the same magnitude (which is not the case with your example!), so the solve block will stop at the first one it comes by and which may not be the one you have in mind.

You can use your example, too, if you multiply vglobal by 2:

thanks a lot VladimirN. Much appreciated. Didn't think about the function but for the real thing may actually be slightly "neater" approach

Werner_E
25-Diamond I
(To:JBlackhole)

Here is a variations which does not limit you to vectors of same length (if only the directions counts) and at least in the example given for some reason unknown to me provides the  "expected" solution:

Regards

Werner

Announcements

Top Tags