From: Mario Veraart (Veraart++at++fel.tno.nl)
Date: 03/13/2001 01:54:38
Mark Evans wrote:
>
> Is it possible to retrieve the rotation, translation
> and scale for a pfDCS ( or pfSCS) separately? You can
> set separately the translation, rotation and scale for
> a pfDCS (through pfDCSTrans, pfDCSRot, pfDCSScale,
> pfDCSScaleXYZ), but you can only retrieve the matrix
> of a pfDCS (pfGetDCSMat). Is it possible to retrieve,
> from this matrix, the translation, rotation and scale?
> I've tried to use pfGetOrthoMatCoord, but it would
> only get me the translation and rotation, not the
> scale.
You can get the scale for (X,Y,Z) by determining the length of the
row or column vectors of the 3x3 part of the matrix.
Then normalize these 'vectors' and determine the rotation parameters with
pfGetOrthoMatCoord
> Is there a unique solution, or could different
> rotations+scales to give the same result?
It depends on the sequence of matrix multiplications if the translation is
scaled too.
> Also, if I want to "animate" a pfDCS from pfMatrix m1
> to pfMatrix m2 through linear interpolation, is it
> correct to linearly interpolate each of the 16
> coefficients of the matrix for the pfDCS between the
> source and destination matrices? Is there a better (or
> correct) way?
It would be ok for the translation part but not for the rotation part.
An approximation is to interpolate the h,p,r parts of the orientation.
Better yet use quaternions.
Mario
This archive was generated by hypermail 2b29 : Tue Mar 13 2001 - 01:55:25 PST