[vtkusers] vnl quaternion question

Richard Frank rickfrank at me.com
Tue Dec 5 08:13:04 EST 2017


I was just at this moment thinking the same thing!

Thanks! 

I’ll check.
Rick

Sent from my iPad

> On Dec 5, 2017, at 8:10 AM, Aron Helser <aron.helser at kitware.com> wrote:
> 
> 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/7fd2af72/attachment.html>


More information about the vtkusers mailing list