• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# Vector problem

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

2 replies to this topic

### #1Blueshift  Members

Posted 04 August 2001 - 03:54 AM

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

### #2Shannon Barber  Moderators

Posted 04 August 2001 - 07:42 PM

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

### #3Blueshift  Members

Posted 06 August 2001 - 03:49 AM

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

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.