Rebuilding matrices

Started by
2 comments, last by Lightrocker 21 years, 6 months ago
I have given a 4x4 matrix for vertex and normal transformation and want to receive a possible set of the scaling, rotation and translation matrices. The multiplication of those matrices should result in the given matrix. Are there code samples, tutorials or similar, that show an optimized way of rebuilding the matrices with the computer? M(Transformation) = M(Scaling) * M(Rotation) * M(Translation) M(Transformation) is given. I want to get ONE possible set of M(Scaling), M(Rotation) and M(Translation).
Advertisement
quote:Original post by Lightrocker
I want to get ONE possible set of M(Scaling), M(Rotation) and M(Translation).


There are an infinite number of possible scaling, rotation and translation operations that equate to a given transformation. How do you choose one from an infinite set? You need to offer some constraints and then the problem is one of constraint satisfaction.

Cheers,

Timkin
To get one of the possible sets, some good constant values should be used. Only the resulting set has to be always the same, if the given matrix is.

Is there still a problem?


[edited by - Lightrocker on October 8, 2002 5:22:47 AM]
Well, "good constant values" is quite subjective I like 0 or 1 because things tend to either disappear or stay the same, but that's just me

You need a system of equations to solve this. Let's write it like this:
Transformation  Scaling       Rotation      Translation      |             |            |              |[ A B C 0 ]   [ J 0 0 0 ]   [ M N O 0 ]   [ 1 0 0 0 ][ D E F 0 ] = [ 0 K 0 0 ] * [ P Q R 0 ] * [ 0 1 0 0 ][ G H I 0 ]   [ 0 0 L 0 ]      [ 0 0 1 0 ]<br>[ 0 0 0 1 ]   [ 0 0 0 1 ]   [ 0 0 0 1 ]   [ V W X 0 ]<br></pre><br><br>You have the values for A - I, so you can create a system of equations <img src="smile.gif" width=15 height=15 align=middle>  However, you will soon realize that you less equations than unknowns.  Thus, you need more constants.  K.I.S.S, so chose something like the identity matrix for the scaling, etc.<br><br><SPAN CLASS=editedby>[edited by - Zipster &#111;n October 8, 2002 12:46:52 PM]</SPAN>    

This topic is closed to new replies.

Advertisement