Rotation Matrix
the nearest Correct matrix(as in it has rotation matrix properties - like its tranpose is its inverse)
Look up the "Gram Schmidt algorithm" for orthonormalising any basis. Treat the rows (or the columns) as the basis vectors. The order in which you pick the first base vector will affect the final outcome though, the first one is unchanged (except that is normalised). You could calculate all possible bases produced by the algorithm, you''d have to do it 6 times though (once for each ordering of the input base vectors). Then pick the matrix which, when subtracted from the original, has least (modulus of the) determinant, i.e. min(abs(det( B_out - B_in ))).
Any orthonormal basis has the properties you describe (transpose is it''s inverse). You may need to check that the final matrix has determinant +1 rather than -1 though, otherwise you get a reflection as well (so you need to reverse one of the output base vectors).
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
Any orthonormal basis has the properties you describe (transpose is it''s inverse). You may need to check that the final matrix has determinant +1 rather than -1 though, otherwise you get a reflection as well (so you need to reverse one of the output base vectors).
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement