Apply your matrix to both endpoints of the up vector -- (0, 0, 0) and (0, 1, 0). Calculate the vector between those two points, and then scale it to get a unit vector. That should take care of the translation concern.
Translation actually does affect it. Let's say in the example the transformation matrix didn't do any scaling or rotation, but did translate it 2 units in the Z direction. Then when you transform (0,1,0) you get (0,1,2), and then normalizing it gives (0,1/sqrt(5), 2/sqrt(5)).
What you want to do is take the difference between the transformation of (0,1,0) and the transformation of (0,0,0), and then normalize the resulting vector. In the above example you would take (0,1,2) minus (0,0,2) (0,0,2 being the transformation of the zero vector) to get (0,1,0) as desired.
1 for elaborating with a concrete example. – Richard Dunlap Jul 13 '09 at 20:12 -1 for not providing a generalized approach. – Janie Jul 13 '09 at 20:23 (ie.
Speaking about inverse matrices) – Janie Jul 13 '09 at 20:24.
Simply multiply the up vector (0,1,0) with the transformation, and normalize. You'll get the new calculated up vector that way.
Thanks! The best solutions are the simplest ^^" – Piotr K Jul 13 '09 at 20:06 Except that this solution doesn't work if the transformation has translation in it. See Alex319's concrete example.
– Richard Dunlap Jul 13 '09 at 20:11 1 He mentioned rotation, but no translation. He'd obviously have to calculate the inverse of the translation matrix. Since the translation matrix commutes with the concatenated rotations, the inverse can be applied at any time.
– Janie Jul 13 '09 at 20:22.
I'm no expert at matrix calculations, but it strikes me as a simple matter of calculating the up vector for the multiplied matrix and normalizing the resulting vector to a unit vector. Translation shouldn't affect it at all, and scaling is easily defeated by normalizing.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.