On Dec 15, 2010, at 7:51 PM, Randy Voet wrote:
> Hi,
>
> I'm looking for matrix (4x4) inversion. I've found
> math.matrices.elimination, but I've come across a problem:
>
> { 0.5 0.5 0.0 } translation-matrix4
> { 0.0 0.0 1.0 } pi 0.5 * rotation-matrix4 m.
> dup inverse m.
>
> This results in
>
> { { 1.0 0.0 0.0 0.0 }
> { 0.0 1.0 0.0 -0.4... }
> { 0.0 0.0 1.0 0.0 }
> { 0.0 0.0 0.0 1.0 } }
>
> instead of the identity matrix (though the difference is small, just one
> cell).
Hi Randy. It looks like the "inverse" function is indeed wrong. Here's the
result of "inverse":
( scratchpad ) { 0.5 0.5 0.0 } translation-matrix4
( scratchpad ) { 0.0 0.0 1.0 } pi 0.5 * rotation-matrix4 m.
( scratchpad ) inverse .
{
{ 0.0 1.0 0.0 -0.9065658975290974 }
{ -1.0 6.123233995736766e-17 0.0 0.4999999999999999 }
{ 0.0 0.0 1.0 0.0 }
{ 0.0 0.0 0.0 1.0 }
}
Compared against manually inverting the components:
( scratchpad ) { 0.0 0.0 -1.0 } pi 0.5 * rotation-matrix4
( scratchpad ) { -0.5 -0.5 0.0 } translation-matrix4 m. .
{
{ 6.123233995736766e-17 1.0 0.0 -0.5 }
{ -1.0 6.123233995736766e-17 0.0 0.4999999999999999 }
{ 0.0 0.0 1.0 0.0 }
{ 0.0 0.0 0.0 1.0 }
}
Aside from numerical error, the 3x3 submatrix looks correct; however, the
fourth column of the "inverse" result is off by { -0.4 0 0 }.
-Joe------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk