Author Topic: About the quaternion R in atomic strain modifiers.  (Read 187 times)

lx_pico

  • Newbie
  • *
  • Posts: 13
About the quaternion R in atomic strain modifiers.
« 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
« Last Edit: June 04, 2019, 10:21:03 AM by lx_pico »

Constanze Kalcher

  • Administrator
  • Sr. Member
  • *****
  • Posts: 301
Re: About the quaternion R in atomic strain modifiers.
« Reply #1 on: June 04, 2019, 11:11:43 AM »
Hello Peter,

this might be helpful
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

-Constanze

lx_pico

  • Newbie
  • *
  • Posts: 13
Re: About the quaternion R in atomic strain modifiers.
« Reply #2 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).