View Full Version : OT: Smooth matrix transition

aleixventa

01-03-2003, 06:30 AM

I've two rotation matrix and I want to do a smooth transition between them (in N steps).

How can I do it?

I thin I need to find a rotation matrix that multiplying the first matrix N times give me the second matrix. How can I find the transition matrix?

Thank you.

JustHanging

01-03-2003, 07:21 AM

Hi,

The best way to do this is to use quaternions. First convert the matrice to quaternions, and use slerp to interpolate them. You can then convert the resulting quaternion back to a matrix.

I don't have the math here, but stick the keywords to google and you should find everything you need.

-Ilkka

jwatte

01-03-2003, 11:49 AM

Note that the column vectors of your matrix (or row, depending on transpose convention :-) are just your three basis vectors; i e what will "X", "Y" or "Z" turn into.

Thus, one valid approach is to linearly interpolate each column (or row) between A and B, and separately normalize them, for each step. This works better for smaller rotations. Also, you should probably choose just two vectors to interpolate, and re-generate the third using cross product for full orthonormality.

Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.