[vtkusers] vnl quaternion question

Aron Helser aron.helser at kitware.com
Tue Dec 5 08:10:21 EST 2017


Auto invQ = q.inverse();
Auto unRotPt = invQ  * rotPt * invQ.conjugate();

that ought to work....

On Mon, Dec 4, 2017 at 11:56 PM, Richard Frank <rickfrank at me.com> wrote:

> Hi,
>
>
>
> I can rotation a point as below, but how to simply get back the original
> point?
>
>
>
>
>
>
>
> vnl_vector_fixed<float,3> pt = {0,1,0};
>
>
>
> vnl_vector_fixed<float,3> axis = {0,0,1};
>
>
>
> vnl_quaternion<float> q = vnl_quaternion<float>(axis,45 * M_PI / 180.0);
>
>
>
> auto rotPt = q * pt * q.conjugate();
>
>
>
>
>
> // how to invert?
>
>
>
> Auto unRotPt = q.inverse() * rotPt; // doesn’t seem to work
>
>
>
>
>
>
>
> Thanks
>
>
>
>
>
> Rick
>
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171205/658a142b/attachment.html>


More information about the vtkusers mailing list