[vtkusers] vtkMath::Matrix3x3ToQuaternion

David Català david.catala at datapixel.com
Fri Dec 17 04:42:15 EST 2004


Hi,
This is the matrix:
0.0230598	0.000660107	0.999738
-0.0972910	0.995259	0.00158695
-0.994993	-0.0973017	0.0230146

And this is the quaternion:
0,714375	-0.034607	0.698065	-0.034278

-----Mensaje original-----
De: David Gobbi [mailto:dgobbi at imaging.robarts.ca]
Enviado el: jueves, 16 de diciembre de 2004 18:17
Para: David Català
CC: vtkusers at vtk.org
Asunto: RE: [vtkusers] vtkMath::Matrix3x3ToQuaternion


On Thu, 16 Dec 2004, [iso-8859-1] David Català wrote:

> Hi,
> I use this function with rotation matrix but when I multiply
> two rotation matrix and later I apply this function this
> warning appears.
>
> Anyway I have some doubts about results beacause I compare with
MATLAB
> and they are diferent in signs. I dont know if order is important in
> this:

The difference in the order is because VTK uses wxyz order, while
MATLAB
apparently uses xyzw order.

The difference in sign is puzzling.  It suggests that one of the two
implementations is using a left-handed coordinate system for
rotations.

> VTK::: 0.9987 0.000232 0.01153 0.487
> MATLAB::: -0.00232 -0.0115 -0.487 0.9987
>
> or
>
> VTK::: -0.9987 0.000232 0.01153 0.487
> MATLAB::: 0.00232 0.0115 0.487 0.9987

I ask you again, PLEASE send an example matrix and the quaternion that
you get from it.

 - David


> thanks,
> David
>
> -----Mensaje original-----
> De: David Gobbi [mailto:dgobbi at imaging.robarts.ca]
> Enviado el: jueves, 16 de diciembre de 2004 17:29
> Para: David Català
> CC: Mathieu Malaterre; vtkusers at vtk.org
> Asunto: RE: [vtkusers] vtkMath::Matrix3x3ToQuaternion
>
>
> Hi David, Mathieu,
>
> Matrix3x3ToQuaternion() works best with a rotation matrix,
> i.e. an orthogonal matrix, but it should be robust enough to
> handle other matrices.  Obviously it would still fail if
> it gets a zero matrix.
>
> Could you send some examples of matrices that it fails on?
>
>  - David
>
>
> On Thu, 16 Dec 2004, [iso-8859-1] David Català wrote:
>
> > Not always.
> >
> > Then when this message appears,
> > Quaternions that I get with this function are incorrect?
> >
> > thanks,
> > David
> > -----Mensaje original-----
> > De: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org]En
> > nombre
> > de Mathieu Malaterre
> > Enviado el: jueves, 16 de diciembre de 2004 17:06
> > Para: David Català
> > CC: vtkusers at vtk.org
> > Asunto: Re: [vtkusers] vtkMath::Matrix3x3ToQuaternion
> >
> >
> > David,
> >
> > 	Are you passing in a symmetric matrix ?
> >
> >
http://public.kitware.com/pipermail/vtkusers/2001-August/056976.html
> > [The Jacobi algorithm only works on a symmetric matrix.  If you
are
> > using Jacobi to do a general eigen analysis, that could explain
why
> > you
> > are seeing this message.]
> >
> > HTH
> > Mathieu
> >
> >
> > David Català wrote:
> > > Hi everyone,
> > > I'm using
> > > 	 vtkMath::Matrix3x3ToQuaternion(matriuRotacions,quaternions);
> > >
> > > I have this warning message:
> > >        "vtkMath::Jacobi: Error extracting eigenfunctions");
> > > 	vtkMath.cxx line640
> > >
> > > If I look the code:
> > >   //// this is NEVER called
> > >
> > >   if ( i >= VTK_MAX_ROTATIONS )
> > >     {
> > >     vtkGenericWarningMacro(
> > >        "vtkMath::Jacobi: Error extracting eigenfunctions");
> > >     return 0;
> > >     }
> > > Why if never called ia have this message??
> > >
> > >
> > > David Català Monter
> > >
> > > DataPixel
> > > Parque Industrial Pallejà
> > > Ronda Santa Eulalia,37, Nave 13
> > > 08780 Pallejà
> > > Barcelona(SPAIN)
> > >
> > > Phone: +34 93 663 30 43
> > > Fax: +34 93 663 18 38
> > > e-mail:david.catala at datapixel.com
> > >
> > >
> > > _______________________________________________
> > > This is the private VTK discussion list.
> > > Please keep messages on-topic. Check the FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> > > Follow this link to subscribe/unsubscribe:
> > > http://www.vtk.org/mailman/listinfo/vtkusers
> > >
> >
> >
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
> > __________ Información de NOD32 1.950 (20041216) __________
> >
> > Este mensaje ha sido analizado con  NOD32 antivirus system
> > http://www.nod32.com
> >
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
>
>
>
> __________ Información de NOD32 1.950 (20041216) __________
>
> Este mensaje ha sido analizado con  NOD32 antivirus system
> http://www.nod32.com
>
>
>



__________ Información de NOD32 1.950 (20041216) __________

Este mensaje ha sido analizado con  NOD32 antivirus system
http://www.nod32.com





More information about the vtkusers mailing list