comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » how to get scale info from a transform matrix?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: how to get scale info from a transform matrix? [message #47598 is a reply to message #47531] Tue, 21 February 2006 14:13 Go to previous messageGo to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
On Tue, 21 Feb 2006 11:14:49 -0800, Rick Towler wrote:

>
>
> Weihua FANG wrote:
>
>> Can someone show me how to get scale info of x, y, z axis from the
>> transform matrix of a IDLgrModel?
>
> You can really only do this for models that haven't been rotated. A 4x4
> scale matrix is defined as:
>
> Sx 0 0 0
> 0 Sy 0 0
> 0 0 Sz 0
> 0 0 0 1
>
> Where Sx, Sy, and Sz are the x, y and z axis scaling factors
> respectively. So:
>

See:

Thomas, Spencer W., Decomposing a Matrix Into Simple Transformations,
Graphics Gems II, p. 320-323, code: p. 599-602, unmatrix.c.

http://www.acm.org/pubs/tog/GraphicsGems/gemsii/unmatrix.c

If there is no shear or perspective, then getting the scale factors
amounts to just taking the length of the column vectors.

Karl
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Fractional Pixels Origin?
Next Topic: Plot sphere and ellipsoid(oblate,prolate,triaxial) by object graphics

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 04:54:10 PDT 2025

Total time taken to generate the page: 0.16108 seconds