Hi Pawel,

Have a look here: http://euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/index.htm

It should provide some insight into what quaternions are and how you can use them to rotate or obtain an axis-angle representation.



On Sun, Nov 24, 2013 at 11:31 PM, Павел Томашевский <crooveck@gmail.com> wrote:
Hi all,

Ok, so today I have to admit that I don't know what quaternions are
but I <probably> will need to use them.
I'm working on PyMOL and Sensable Phantom Omni haptic device
integration using Virtual Reality Peripherial Network (VRPN).

So far I have a nicely working plugin for PyMOL that can retreive
X,Y,Z coordinates and vector of four quaternion values.

My CGO pointer (cone) can smoothly move according to X,Y and Z
changes. Now I need to do some rotations of the pointer. AFAIK
'rotate' function accepts only degree value of rotation around axis.

My question is: is there any build in PyMOL function that accepts four
quaternion values and do rotation (instead of degree for each axis)?

If not: do you have any simple hint or math formulas for me :) to
calculate angles for rotation of CGO out of four quaternion value?

Pawel 'crooveck' Tomaszewski

Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Tsjerk A. Wassenaar, Ph.D.