[vtkusers] vtkQuaternionToMatrix3x3 needs verification or correction!

David Gobbi david.gobbi at gmail.com
Wed Jan 5 09:51:26 EST 2011


Hi Tamas,

Thanks for the report.  I have verified that the sqrt() operation was in error.
I've pushed this fix to vtk-devel and it will make it into the next release.

  David


On Tue, Jan 4, 2011 at 5:20 PM, Tamas Ungi <ungi.tamas at gmail.com> wrote:
> Hi VTK Users,
>
>
>
> In vtkMath.cxx, line 1766, the square root is taken of the sum of squares.
> (vtk 5.6.0)
>
>
>
> We think that this produces wrong matrices in case the input quaternion is
> not normalized.
>
> The correct formula would be the same, just without the sqrt().
>
>
>
> We have verified this correction with this matlab function:
>
> http://www.csse.uwa.edu.au/~pk/Research/MatlabFns/Rotations/quaternion2matrix.m
>
> vtkMath.cxx produces the same matrices only if the sqrt() is taken away.
>
>
>
> Could someone with write permission have a look and maybe fix this in the
> VTK repository?
>
> I'm happy to help with further testing if needed.
>
>
>
> Thanks,
>
> Tamas



More information about the vtkusers mailing list