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

From one space to another

This topic is 5586 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

Not a lot of info there. But here goes...

If it''s a linear transformation, multiply the vector by the matrix representing your linear transform. Note that the origin will always stay fixed for a linear map since
f( x + y ) = f( x ) + f( y )

If it''s affine, you could use homogenous coordinates and matrices, or you could add an affine translation after multiplying by a matrix.

If it''s orthonormal (i.e. distance & angle preserving), the determinant of the matrix will be +/-1, and all rows/columns will be linearly independent. All rotations are orthonormal (det 1), reflections are det -1 and hence will invert the geometry of your space.

Share this post

Link to post
Share on other sites
a transpose of the orientation matrix would suffice (3x3 transpose involving the three basis vectors). a transpose is a reflection along the diagonal of the matrix.

position is treated differently,

px = -I * P
py = -J * P
pz = -K * P

(* being dot products, and IJKP are the basis vectors and position of the matrix you''re inverting).

note that if the matrix contains scaling or shearing, this won''t work..

Share this post

Link to post
Share on other sites
Hi, thanks for your answers.
Anyone has C source code that could share with me about to compute the inverse of a 4x4 matrix ?

Thanks, i''ll really appreciate.

Share this post

Link to post
Share on other sites
Ok, if you have the basis vectors of the space you want to transform into, and it''s reletive position from this vector, then you can transform into it by multiplying it by the matrix:


Where the S, U, and F vectors ( side up and front ) are the basis vectors of the new space ( should be orthonormal, otherwise you''ll get some funky warping going on ), and T is the translation vector.


Death of one is a tragedy, death of a million is just a statistic.

Share this post

Link to post
Share on other sites