Re: [Algorithms] Extracting scale from matrix
Brought to you by:
vexxed72
From: Pierre T. <p.t...@wa...> - 2000-09-07 18:58:28
|
This is a classic problem whose solution is described in: Matrix Animation and Polar Decomposition - Ken Shoemake and Tom Duff. (Proceedings of Graphics Interface 1992.) An implementation can be found in the MAX SDK, in Decomp.cpp (this is the source code for the famous decomp_affine method of the MAX SDK). Unfortunately the code is really ugly, and I think it's even not included in the standard SDK (which only contains headers IIRC). To extract the scale they use a spectral decomposition as described in: Gene H. Golub and Charles F. Van Loan. Matrix Computations. Hopkins 1983. Pierre ----- Original Message ----- From: Neal Tringham <ne...@ps...> To: <gda...@li...> Sent: Thursday, September 07, 2000 7:17 PM Subject: Re: [Algorithms] Extracting scale from matrix > > De: Jon Anderson [mailto:jan...@on...] > > >Are there any good tricks for extracting the scale (x, y, z) from a 4x4 > >matrix? It seems pretty trivial to do it for matrices that consist of > >rotations about a single axis, but I'm having problems doing it for more > >complex matrices. > > If your matrix contains only rotation, scale and translation information, > could you extract the scale factors by comparing the length of the basis > vectors to the length of the normalised basis vectors? > > Note that (even if this works:-)) I don't believe it would allow you to > distinguish between a negative sign in a scale factor (a "mirror") and a > rotation, i.e. it would only allow you to extract the magnitude of the scale > factors, not their signs. > > Curious as to people's comments on this... > > Neal Tringham (Sick Puppies) > > ne...@ps... > ne...@em... > > > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |