Re: [eigen] get scaling out of transform?

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


On Wed, 21 Jan 2009, Benoit Jacob wrote:

There's another way that you can go, suffering again performance-wise
from the current lack of fixed-size specializations: use the
SelfAdjointEigenSolver.

Transform3d t;
Matrix3d m = t.linear();
SelfAdjointEigenSolver s(m*m.adjoint());
Matrix3d scaling = s.operatorSqrt();

This is numerically a bit dangerous. You lose information when computing the product m*m.adjoint(). This may not be that important in this case though, because the matrices are small and (I'd guess) the accuracy requirement is lax.


Jitse



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/