I can confirm this - just did some testing and there's definitely *something* weird going on. Certainly there is no way that either the invert() or concat() functions are working like a normal matrix multiplication. Further tests show:

(1,2,3,4,1,1) concat with (1,0,0,-1,0,0) gives (1,-2,3,-4,1,-1) instead of (1,-2,3,-4,1,1) (1,2,3,4,1,1) concat with (-1,0,0,1,0,0) gives (-1,2,-3,4,-1,1) instead of (-1,2,-3,4,1,1)

Not sure what this means, but I think it might help narrow it down. I can also confirm that the same issue shows up on non-reflective matrices (det>0)

Danny


----- Original Message ----- From: "Alan Shaw" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Thursday, March 23, 2006 2:33 AM
Subject: [Flashcoders] A little Matrix.invert() mystery


Thomas Pfeiffer, author of the DistortImage class, notes in his blog that
Matrix.invert() returns a result different from the true mathematical
inverse of the matrix!

He calls the invert() function on a new Matrix(1, 2, 3, 4, 5, 6)
and gets back
(a=-2, b=1, c=1.5, d=-0.5, *tx=1, ty=-2*)
rather than the expected
{a: -2, b: 1, c: 1.5, d: -0.5, tx: 4, ty: -4.5}
as returned by an explicit (and by the way faster) matrix invert function he
wrote himself,
and as returned in Matlab.
But this "erroneous" result, when concatted with the original in Flash,
gives the identity matrix!
What can be going on here?

Here's the link to his blog (in French):
http://kiroukou.media-box.net/blog/mes-recherches-sur-flash/62-classe-matrix-de-flash8-eronnee.html
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to