OVITO Forum

OVITO => Support Forum => Topic started by: lx_pico on June 04, 2019, 10:16:12 AM

Title: About the quaternion R in atomic strain modifiers.
Post by: lx_pico on June 04, 2019, 10:16:12 AM
Hi, Alex and OVITO users,
     I don't understand how the quaternion R(X, Y, Z, W)  in atomic strain modifiers is obtained from the rotation matrix, specifically, what are the physical meanings of the value of Rotation.X-W respectively? can you guys give me some imformation?

Thanks.
Peter
Title: Re: About the quaternion R in atomic strain modifiers.
Post by: Constanze Kalcher on June 04, 2019, 11:11:43 AM
Hello Peter,

this might be helpful
https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation (https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation)

and also the link to the OVITO code if you're interested in the technical details:
https://gitlab.com/stuko/ovito/blob/master/src/core/utilities/linalg/Quaternion.h#L283-318 (https://gitlab.com/stuko/ovito/blob/master/src/core/utilities/linalg/Quaternion.h#L283-318)

-Constanze
Title: Re: About the quaternion R in atomic strain modifiers.
Post by: lx_pico on June 08, 2019, 10:54:31 AM
Thank you, Constanze.

Now I understand that Rotation.i = ui*sin(theta/2), where theta is the rotation angle and ui the ith component of unit rotation axis, and Rotation.W = cos(theta/2).