OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

cgmo-webcgm message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [cgmo-webcgm] COMMENTS: Chapter 5


I think I made a mistake, I assumed that 'successive basic operations' and 'nested transforms' (SVG wording) were the same. That being said, we should add an example for 'nested transforms' (available via XCF). See SVG example (and the post-multiply I'm referring to): http://www.w3.org/TR/SVG11/coords.html#NestedTransformations


From: Lofton Henderson [mailto:lofton@rockynet.com]
Sent: Tuesday, May 06, 2008 1:58 PM
To: Bezaire, Benoit; CGM Open WebCGM TC
Subject: Re: [cgmo-webcgm] COMMENTS: Chapter 5

[Okay, the mistake was that I multiplied Mt*Ma, as Benoit seemed to imply was the correct matrix for a translate followed by a rotate, rather than my intended and documented Ma*Mt.  The Mt*Ma matrix, applied to p = (1,0) [the 3x1 column vector (1,0,1) in homogeneous coordinates] produces the result:  (1,2)  [or (1,2,1) homogeneous], which is wrong!   Corrected below...]

Hi Beniot,

At 11:30 AM 5/6/2008 -0400, Bezaire, Benoit wrote:
5.4.4.1: I think this is wrong: Successive basic operations are performed by left-multiplying the matrices corresponding to the operations - we need to post-multiply, not pre-multiply. There's a distinction between which 'transforms' happens first vs which 'matrix' is first.

Hmmm... the terms "pre-multiply" and "post-multiply" are a little too unspecific for my taste (having math degrees may be a disadvantage here!).  Let's get specific.

The text says this:

[[[
Successive basic operations are performed by left-multiplying the matrices corresponding to the operations. For example, a translation by Mt followed by a rotation by Ma is performed by:

    p' = Ma * Mt * p
]]]

Are you saying that is wrong?  Since matrix multiplication is associative, then these two are equivalent:

p' = Ma * (Mt * p)
p' = (Ma * Mt) * p

The first one clearly transforms the point p by Mt (translation) first, then transforms that result by Ma (rotation). 

Example:  Suppose the point is (1,0) [which is the 3x1 column vector (1,0,1) in homogeneous coordinates].  Suppose I right-translate by 1 -- result (2,0), yes?  Suppose I then rotate counter-clockwise by 90 degrees about the origin -- (0,2), yes?

Mt is:
1 0 1
0 1 0
0 0 1

Ma is:
0 1 0
1 0 0
0 0 1

Ma*Mt is:
0 1 0
1 0 1
0 0 1

Compute (Ma*Mt)*p, where p is the column vector (1,0,1) [homogeneous]:  the result is (0,2,1) [homogeneous].

So ... where is our disconnect here?  That example shows that the point (1,0) is correctly transformed to (0,2) by the math as written in 5.4.4.1.

-Lofton.

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]