Skip to content

Commit 446c31c

Browse files
authored
Merge pull request #49 from KieranWynn/handedness-clarification
reference frame clarification
2 parents 5a169bf + 6b41a3f commit 446c31c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

docs/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,13 @@ A cool feature of quaternions is that they can be intuitively chained together t
5151

5252
>>> q1 = Quaternion(axis=[1, 0, 0], angle=3.14159265) # Rotate 180 about X
5353
>>> q2 = Quaternion(axis=[0, 1, 0], angle=3.14159265 / 2) # Rotate 90 about Y
54-
>>> q3 = q1 * q2 # Composite rotation of q1 then q2 expressed as standard multiplication
54+
>>> q3 = q2 * q1 # Composite rotation of q1 then q2 expressed as standard multiplication (note quaternions are multiplied in reverse order of rotation)
5555
>>> v_prime = q3.rotate(v)
5656
>>> v_prime
57-
array([ 1., 0., 0.])
57+
array([ -1., 0., 0.])
5858
>>>
59+
> Note: pyquaternion assumes a right-handed coordinate system compatible with East-North-Up and North-East-Down conventions.
60+
5961

6062
Quaternions are used extensively in animation to describe smooth transitions between known orientations. This is known as interpolation. This is an example of an area where quaternions are preferred to rotation matrices as smooth interpolation is not possible with the latter. Here's quaternion interpolation in action:
6163

0 commit comments

Comments
 (0)