### RE: [Algorithms] transforming vectors...

Jamie Fowlston <jamief <at> qubesoft.com>

2003-04-01 10:06:39 GMT

<snip>
I claim, that if we only have uniform scales and rotations
then:
M = SA = AS
...
</snip>
That's of course true, as a uniform scale is just multiplication by a
scalar, you needn't go into matrix form at all :)
Jamie
-----Original Message-----
From: gdalgorithms-list-admin <at> lists.sourceforge.net
[mailto:gdalgorithms-list-admin <at> lists.sourceforge.net]On Behalf Of
Willem H. de Boer
Sent: 01 April 2003 09:49
To: gdalgorithms-list <at> lists.sourceforge.net
Subject: RE: [Algorithms] transforming vectors...
Yes, you're absolutely right. As my final post to this thread
before I get chased away for bringing math to the peaceful and
quiet community that is GDAlgorithms:
I claim, that if we only have uniform scales and rotations
then:
M = SA = AS
and thus:
S^{-1} A^{-1} = A^{-1} S^{-1}
Then:
M^{-1} = (SA)^{-1}
= (AS)^{-1}
= S^{-1} A^{-1}
= S^{-1} A^t (1)
And:
M^-t = (M^{-1})^t
= (S^{-1} A^t)^t
= (A^t S^{-1})^t
= (S^{-1})^t (A^t)^t
= S^{-1} A (2)
Using (1),(2) in the proof in my previous post shows that you
can just use M to transform normal vectors, rather than
its inverse transpose M^-t, if and only if the matrix M contains
rotations and ___uniform___ scales. And ___only___ if you ___always___
normalise your normals afterwards do normals transform
exactly the same under either transformation.
Willem H. de Boer
> -----Original Message-----
> From: Jamie Fowlston [mailto:jamief <at> qubesoft.com]
> Sent: 31 March 2003 18:24
> To: gdalgorithms-list <at> lists.sourceforge.net
> Subject: RE: [Algorithms] transforming vectors...
>
>
> No.
>
> (M^{-1})^t = (S^{-1} A^t)^t
> = (S^{-1})^t (A^t)^t
> = S^{-1} A
>
> is not true. t(AB) = t(B)t(A), so
>
> t(inv(M)) = t(inv(S) t(A))
> = t(t(A)) t(inv(S))
> = A inv(S)
>
> (___not___ inv(S) A)
>
>
> Regardless, my previous post showed that if
>
> a = Sx
> b = S^{-1}x
>
> then a and b are not in general colinear.
>
> Jamie
>
>
> -----Original Message-----
> From: gdalgorithms-list-admin <at> lists.sourceforge.net
> [mailto:gdalgorithms-list-admin <at> lists.sourceforge.net]On Behalf Of
> Willem H. de Boer
> Sent: 31 March 2003 17:16
> To: gdalgorithms-list <at> lists.sourceforge.net
> Subject: RE: [Algorithms] transforming vectors...
>
>
> >And it wouldn't work for any scalings (apart from the trivial
> >one: all 1's) either. Because a matrix that contains a scaling
> >in whatever direction is not an orthogonal matrix. Before anyone
> >starts objecting: With orthogonal I mean M^T M = I, it's what
> >many people would call orthonormal.
>
> Actually, it ___would___ work for scalings, as I've just found out.
>
> [People not interested in maths should click away, NOW]
>
> Suppose M is a transformation (an NxN matrix), composed of two
> other transformations M = SA, where both S and A are NxN matrices.
> S is a scaling matrix, and is thus diagional. And A is an orthogonal
> matrix (or orthonormal, if you will). Now we want to "prove"
> that for a given vector v:
>
> Mv . Nv = |Mv| |Nv| (1)
>
> Or, the vector a=Mv, is colinear but not necessarily of same magnitude
> to the vector b=Nv, where N is the inverse transpose of M. Let's
> calculate the inverse transpose of M, firstly, its inverse:
>
> M^{-1} = (S A)^{-1} = S^{-1} A^{-1} = S^{-1} A^t
>
> The last bit comes from the fact that the inverse of an orthogonal
> matrix is just its transpose. Now let's take the transpose of M^{-1}
>
> (M^{-1})^t = (S^{-1} A^t)^t
> = (S^{-1})^t (A^t)^t
> = S^{-1} A
>
> The last bit coming from the fact that the transpose of a diagonal
> matrix (S^{-1}, in this case, the inverse of S) is the same
> matrix. And the transpose of the transpose of a matrix A, is
> just A.
>
> So, now back to the original statement (1). We can rewrite the vector
> a as:
> a = Mv = (SA)v
> and b:
> b = M^-tv = (S^{-1} A)v
>
> Now we now that both a and b transform similarily under A:
> so, let's call Av, x, both equations reduce to:
>
> a = Sx
> b = S^{-1}x
>
> So, yes, you're assumption was right. a, and b will be colinear
> but of different magnitudes, if and only if M is a transformation
> that consists only of rotations, and scalings (even non-uniform ones).
>
> Willem
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> GDAlgorithms-list mailing list
> GDAlgorithms-list <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
> Archives:
> http://sourceforge.net/mailarchive/forum.php?forum_id=6188
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb:
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> GDAlgorithms-list mailing list
> GDAlgorithms-list <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
> Archives:
> http://sourceforge.net/mailarchive/forum.php?forum_id=6188
>
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
GDAlgorithms-list mailing list
GDAlgorithms-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=6188
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
GDAlgorithms-list mailing list
GDAlgorithms-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=6188