View Full Version : When scaling used, axis are not orthogonal

02-18-2002, 02:39 PM
Does someone have experience with using transformation matrices which include scaling, rotation and translation matrices?
Until now I only used rotation and translation and everything was fine and easy to handle. With the scaling part added, I end up with local reference frames with non-orthogonal x,y and z-axis. This makes everything much more complicated (for exact collision detection and so on). Can someone give me some good piece of advice?

Thanks http://www.opengl.org/discussion_boards/ubb/smile.gif

02-18-2002, 08:29 PM

I have a similar question: the following matrix (or any combination of translations/rotations):

M = T3*R3*T2*R2*T1*R1*R0*T0

can always be reduced to one translation and one rotation : m = T4*R4

But this is not the case when using Scalings:

M = T1*R1*S1*T0*R0*S0 cannot be simplified as M = T2*R2*S2. This is my problem!

02-19-2002, 04:44 AM
The solution it's quite easy, while doing trasnformations (translations, rotations and scaling) U must keep in kmind you aren't modifying the objects, you are modifying the coordinate system (not really but that's easyer to understand).
So if you do a scale like glScale(2,1,1) you must remember that after that a translate like glTranslate(1,0,0); qill end up in :

Finalmatrix = TranslateX * ScaleX, so the translation won't be of 1, but will be of 2 units.

The same for rotations.

rIO.sK http://www.spinningkids.org/rio