Sign in to follow this  

Extracting Rotation Vector from 3-by-4 Matrix

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi I would like to ask you how can I extract Vector3D from a 34 Matrix? float m11, m12, m13; float m21, m22, m23; float m31, m32, m33; float m41, m42, m43; Please help! Thanks.

Share this post


Link to post
Share on other sites
Those types of matrices are used for solving systems of affine equations in linear algebra. You don't need to extract coordinates from them.

If Mx = 0 has a solution (i.e. det(M) != 0), then Mx = d has a solution if and only if rank(M) = rank(M|d) i.e. number of linearly independent rows & columns of M is the same when the particular solution vector (d) is "joined onto" the matrix (denoted "M|d").

That's probably (alot) more than you need to worry about though. Its not really anything to do with 3d graphics, the transformation matrices are always square in that case.

Share this post


Link to post
Share on other sites
i guess its a 3x4 since the bottom part stores translation?

in that case you can just discard the bottom part and look for the rotation vector described in the top 3x3 part, something that is easily googled.

if this is not the case, im confused aswell.

Share this post


Link to post
Share on other sites
Frequently a 3x4 (or 4x3) matrix is used in place of a 4x4 matrix. 99% of the time, the missing column (or row) is [0,0,0,1]. So, rather than store those values, they are assumed.

In any case, the math still works:
             | m11 m12 m13 |
| x y z 1 | | m21 m22 m23 | = | x' y' z' |
| m31 m32 m33 |
| m41 m42 m43 |
which is effectively the same as:
             | m11 m12 m13 0 |
| x y z 1 | | m21 m22 m23 0 | = | x' y' z' 1 |
| m31 m32 m33 0 |
| m41 m42 m43 1 |

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this