Vector problem

Started by
1 comment, last by Blueshift 22 years, 8 months ago
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
Advertisement
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
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
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

This topic is closed to new replies.

Advertisement