Re: Matrix order

New Message Reply Date view Thread view Subject view Author view

Stuart Levy (slevy++at++ncsa.uiuc.edu)
Sat, 18 Sep 1999 09:41:31 -0500 (CDT)


> Don Hatch (hatch++at++hell.engr.sgi.com) wrote:
  
> On Sep 17, 12:30pm, Scott Herod wrote:
> > Subject: Re: Matrix order
> > I think the confusion is with the names of the various pfMatrix
> > routines. For example does postRot( M, d, x, y, z ) mean compute
> > M*R where R is the rotation matrix or R*M? I am writing the matrix
> > multiplication right to left as is standard so that M*R means first
> > rotate then apply M.
>
> Regardless of row/column convention,
> "post" always means apply the incremental operation
> "after" the current cumulative transform
> (i.e., intuitively, on the "world space" side of the cumulative transform
> rather than the "local space" side).

Yes yes yes, *this* is the way to explain it! I get very frustrated with
descriptions that talk about multiplying A "before" or "after" B, since
after-ness doesn't have a unique meaning; you might imagine a sequence of
OpenGL calls like
   glMultMatrixf( B );
   glMultMatrixf( A ); /* does this mean "A after B"?? */

or "after" might refer to reading the algebra left-to-right,
in which case it changes sense according to whether you write p*M or M*p!
But describing a matrix as being multiplied on the local-space
vs. world-space side is unambiguous no matter which way you think of
writing the algebra.
    
Another way to disambiguate would be to write matrix expressions
that explicitly include transformed points, e.g. you might describe
postRot( M, d, x,y,z ) as changing M into M' so that, for any point p,
  p * M' = p * M * Rotation(d,x,y,z)
in which it's also clear that the rotation applies to world space,
not local/object space. And this kind of algebraic description makes it
easier to write down what the result should be after several steps.

   Stuart Levy, slevy++at++ncsa.uiuc.edu


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Sat Sep 18 1999 - 07:41:38 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.