#### Archived

This topic is now archived and is closed to further replies.

# Vector problem

This topic is 6010 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello I have a small problem with vectors, I''m sure the solution is rather easy, but I just can''t find it OK, I have a 3D point P(x,y,z). I rotate this point around the origin of the coordinate system using an arbitrary (but valid) 3x3x3 rotation matrix M: Pn = P * M Now, I have an arbitrary unit vector A (independent of the point or matrix) going through the origin. I would like to know, how far the transformed point Pn has rotated around A (seen as an axis). Currently I''m doing this by projecting P and Pn onto the plane formed by A (A beeing it''s normal) and measuring the angle between the two projected points with respect to the origin. This works but seems a bit kludgy, isn''t there some way to directly extract this information from the matrix and A, without having to project the points ? Thanks ! A.H aka Blueshift

##### Share on other sites
I''m just curious what you need to do that for? Are you trying to determin three seperate angle rotations that make up that rotation?

I thought of a couple of other ways to do it, but they are essentially the same as the projection method.

Magmai Kai Holmlor
- Not For Rent

##### Share on other sites
Well, it was for a physical simulation of a hierarchic IK chain with joints that rotate / translate on a given axis.

But I quickly noticed that even the projection method was flawed: under certain circumstances, it would run into a special form of the gimbal lock, so it was rather unusable.

I changed the representation from matrices to quaternions, it''s rather easy to extract axis/angle information from them, and now I''m happy

A.H aka Blueshift